MySQL 9.1.0
Source Code Documentation
|
The abstract class for seekable input streams which have fixed length and provide seek operation. More...
#include <basic_istream.h>
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 |
The abstract class for seekable input streams which have fixed length and provide seek operation.
|
overridedefault |
|
pure virtual |
The total length of the stream.
Implemented in IO_CACHE_istream, Binlog_encryption_istream, and Basic_binlog_ifile.
|
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.
[in] | offset | Where the read position will be. |
false | Success |
true | Error |
Implemented in IO_CACHE_istream, Binlog_encryption_istream, and Basic_binlog_ifile.