Abstract class for a stream of bytes.
Abstract class for a stream of bytes. Class ByteStream represent an object from which (resp. to which) bytes can be read (resp. written) as with a regular file. Virtual functions read and write must implement these two basic operations. In addition, function tell returns an offset identifying the current position, and function seek may be used to change the current position.Note. Both the copy constructor and the copy operator are declared as private members. It is therefore not possible to make multiple copies of instances of this class, as implied by the class semantic.
virtual size_t read(void *buffer, size_t size)
virtual size_t write(const void *buffer, size_t size)
virtual long tell(void)
virtual int is_seekable(void) const
virtual void seek(long offset, int whence = SEEK_SET)
Results are undefined whenever the new position is greater than the
total size of the ByteStream. Exception GException is thrown with
a plain text error message whenever an error occurs.
virtual void flush()
size_t writall(const void *buffer, size_t size)
size_t copy(ByteStream &bsfrom, size_t size=0)
void write8(unsigned int card8)
void write16(unsigned int card16)
void write32(unsigned int card32)
unsigned int read8()
unsigned int read16()
unsigned int read32()
Alphabetic index HTML hierarchy of classes or Java