MySQL 8.3.0
Source Code Documentation
Basic_istream Class Referenceabstract

The abstract class for basic byte input streams which provides read operations. More...

#include <basic_istream.h>

Inheritance diagram for Basic_istream:
[legend]

Public Member Functions

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 basic byte input streams which provides read operations.

Constructor & Destructor Documentation

◆ ~Basic_istream()

virtual Basic_istream::~Basic_istream ( )
virtualdefault

Member Function Documentation

◆ read()

virtual ssize_t Basic_istream::read ( unsigned char *  buffer,
size_t  length 
)
pure virtual

Read some bytes from the input stream.

It should read exact 'length' bytes unless error happens or it reaches the end of the stream. It should block when reaching the end of a pipe that is not closed.

Parameters
[out]bufferWhere data will be put in.
[in]lengthThe number of bytes that you want to read. length should not be larger than max long.
Returns
Return values fall into three cases:
Return values
'length'Read 'length' bytes successfully
>=0Reach EOF, return the number of bytes actually read. It is between 0 and length-1.
-1Error.

Implemented in IO_CACHE_istream, Stdin_istream, Binlog_encryption_istream, and Basic_binlog_ifile.


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