24#ifndef BASIC_ISTREAM_INCLUDED
25#define BASIC_ISTREAM_INCLUDED
143 bool open(std::string *errmsg);
The abstract class for basic byte input streams which provides read operations.
Definition: basic_istream.h:33
virtual ssize_t read(unsigned char *buffer, size_t length)=0
Read some bytes from the input stream.
virtual ~Basic_istream()=default
The abstract class for seekable input streams which have fixed length and provide seek operation.
Definition: basic_istream.h:58
~Basic_seekable_istream() override=default
virtual bool seek(my_off_t offset)=0
Puts the read position to a given offset.
virtual my_off_t length()=0
The total length of the stream.
A file input stream based on IO_CACHE class.
Definition: basic_istream.h:88
IO_CACHE_istream(const IO_CACHE_istream &)=delete
ssize_t read(unsigned char *buffer, size_t length) override
Read some bytes from the input stream.
Definition: basic_istream.cc:67
void close()
Closes the stream.
Definition: basic_istream.cc:58
bool open(PSI_file_key log_file_key, PSI_file_key log_cache_key, const char *file_name, myf flags, size_t cache_size=IO_SIZE *2)
Open the stream.
Definition: basic_istream.cc:34
IO_CACHE_istream & operator=(const IO_CACHE_istream &)=delete
~IO_CACHE_istream() override
Definition: basic_istream.cc:32
my_off_t length() override
Get the length of the file.
Definition: basic_istream.cc:65
bool seek(my_off_t bytes) override
Puts the read position to a given offset.
Definition: basic_istream.cc:75
IO_CACHE m_io_cache
Definition: basic_istream.h:125
A stdin input stream based on IO_CACHE.
Definition: basic_istream.h:132
Stdin_istream(const Stdin_istream &)=delete
bool skip(my_off_t bytes)
Skip bytes data from the stdin stream.
Definition: basic_istream.cc:119
ssize_t read(unsigned char *buffer, size_t length) override
Read some bytes from the input stream.
Definition: basic_istream.cc:114
bool open(std::string *errmsg)
Opens the stdin stream.
Definition: basic_istream.cc:87
IO_CACHE m_io_cache
Definition: basic_istream.h:157
Stdin_istream & operator=(const Stdin_istream &)=delete
~Stdin_istream() override
Definition: basic_istream.cc:85
void close()
Closes the stream.
Definition: basic_istream.cc:112
unsigned int PSI_file_key
Instrumented file key.
Definition: psi_file_bits.h:48
static int flags[50]
Definition: hp_test1.cc:40
int myf
Definition: my_inttypes.h:94
ulonglong my_off_t
Definition: my_inttypes.h:72
Common #defines and includes for file and socket I/O.
constexpr const size_t IO_SIZE
Definition: my_io.h:159
#define HAVE_PSI_INTERFACE
Definition: my_psi_config.h:39
Common header for many mysys elements.
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
std::string file_name(Log_file_id file_id)
Provides name of the log file with the given file id, e.g.
Definition: log0pre_8_0_30.cc:94
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:420
static uint64_t cache_size
Definition: xcom_cache.cc:362