class ByteStream: :Obsolete : public ByteStream

ByteStream::Obsolete impliments backwards compatable ByteStreams to support old code.

Inheritance:


Inherited from ByteStream:

Public Methods

ostatic GP<ByteStream> create(void)
ostatic GP<ByteStream> create(void const * const buffer, const size_t size)
ostatic GP<ByteStream> create( const char filename[], char const * const mode)
ostatic GP<ByteStream> create( const int fd, char const * const mode, const bool closeme)
ostatic GP<ByteStream> create( FILE * const f, char const * const mode, const bool closeme)
ostatic GP<ByteStream> create_static( void const * const buffer, const size_t size)

Public

class Stdioclass Staticclass Memoryclass Virtual Functions.

[more]virtual ~ByteStream()
Virtual destructor.
[more]virtual size_t read(void *buffer, size_t size)
Reads data from a ByteStream.
[more]virtual size_t write(const void *buffer, size_t size)
Writes data to a ByteStream.
[more]virtual long tell(void) const
Returns the offset of the current position in the ByteStream.
[more]virtual int seek(long offset, int whence = SEEK_SET, bool nothrow=false)
Sets the current position for reading or writing the ByteStream.
[more]virtual void flush(void)
Flushes all buffers in the ByteStream.

Utility Functions.

[more]size_t readall(void *buffer, size_t size)
Reads data and blocks until everything has been read.
[more]size_t writall(const void *buffer, size_t size)
Writes data and blocks until everything has been written.
[more]size_t copy(ByteStream &bsfrom, size_t size=0)
Copy data from another ByteStream.
[more]void write8(unsigned int card8)
Writes a one-byte integer to a ByteStream.
[more]void write16(unsigned int card16)
Writes a two-bytes integer to a ByteStream.
[more]void write24(unsigned int card24)
Writes a three-bytes integer to a ByteStream.
[more]void write32(unsigned int card32)
Writes a four-bytes integer to a ByteStream.
[more]unsigned int read8()
Reads a one-byte integer from a ByteStream.
[more]unsigned int read16()
Reads a two-bytes integer from a ByteStream.
[more]unsigned int read24()
Reads a three-bytes integer from a ByteStream.
[more]unsigned int read32()
Reads a four-bytes integer from a ByteStream.
[more]virtual int size(void) const
Returns the total number of bytes contained in the buffer, file, etc.
[more]TArray<char> get_data(void)
Use at your own risk, only guarenteed to work for ByteStream::Memorys.
[more]virtual size_t readat(void *buffer, size_t sz, int pos)
Reads data from a random position.


Inherited from GPEnabled:

Public Methods

oGPEnabled& operator=(const GPEnabled & obj)
oint get_count(void) const

Protected Fields

ovolatile int count


Documentation

ByteStream::Obsolete impliments backwards compatable ByteStreams to support old code. Since an exception in a constructor will leak memory in your program, we recommend to use the ByteStream::create methods instead.

This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


DjVu is a trademark of LizardTech, Inc.
All other products mentioned are registered trademarks or trademarks of their respective companies.