MySQL 9.1.0
Source Code Documentation
Basic_seekable_istream Class Referenceabstract

The abstract class for seekable input streams which have fixed length and provide seek operation. More...

#include <basic_istream.h>

Inheritance diagram for Basic_seekable_istream:
[legend]

Public Member Functions

virtual bool seek (my_off_t offset)=0
 Puts the read position to a given offset. More...
 
virtual my_off_t length ()=0
 The total length of the stream. More...
 
 ~Basic_seekable_istream () override=default
 
- Public Member Functions inherited from Basic_istream
virtual ssize_t read (unsigned char *buffer, size_t length)=0
 Read some bytes from the input stream. More...
 
virtual ~Basic_istream ()=default
 

Detailed Description

The abstract class for seekable input streams which have fixed length and provide seek operation.

Constructor & Destructor Documentation

◆ ~Basic_seekable_istream()

Basic_seekable_istream::~Basic_seekable_istream ( )
overridedefault

Member Function Documentation

◆ length()

virtual my_off_t Basic_seekable_istream::length ( )
pure virtual

The total length of the stream.

Implemented in IO_CACHE_istream, Binlog_encryption_istream, and Basic_binlog_ifile.

◆ seek()

virtual bool Basic_seekable_istream::seek ( my_off_t  offset)
pure virtual

Puts the read position to a given offset.

The offset counts from the beginning of the stream. In case an implementing class transforms the data in a way that does not preserve positions, the offset here will be relative to the bytes that are read out from the stream, not relative to the bytes in lower layer storage.

it is allowed for a subclass to return success even if the position is greater than the size of the file. Error may be returned by the next read for this case. Users should call length() if they need to check that the position is within bounds.

Parameters
[in]offsetWhere the read position will be.
Return values
falseSuccess
trueError

Implemented in IO_CACHE_istream, Binlog_encryption_istream, and Basic_binlog_ifile.


The documentation for this class was generated from the following file: