#include <Streams.hpp>
Inheritance diagram for Stream::MemoryBufferedStream:
Public Member Functions | |
virtual uint32 | currentPosition () const |
This method returns the position of the next byte that could be read from this stream. | |
virtual bool | endReached () const |
This method returns true if the end of stream is reached. | |
virtual uint32 | fullSize () const |
This method returns the stream length in byte, if known If the length is equal or higher than 2^32 - 1, the returned value is 0xfffffffe. | |
uint8 * | getBuffer () |
Get the buffer. | |
virtual bool | goForward (const uint32 &skipAmount) |
Move the stream position forward of the given amount This should give the same results as setPosition(currentPosition() + value), but implementation can be faster for non-seek-able stream. | |
MemoryBufferedStream (const InputStream &is) | |
The only allowed constructor. | |
virtual uint32 | read (void *const buffer, const uint32 &size) const throw () |
Try to read the given amount of data to the specified buffer. | |
virtual bool | setPosition (const uint32 &newPos) |
Try to seek to the given absolute position (return false if not supported). | |
~MemoryBufferedStream () | |
The only allowed destructor. |
Stream::MemoryBufferedStream::MemoryBufferedStream | ( | const InputStream & | is | ) | [inline] |
The only allowed constructor.
Stream::MemoryBufferedStream::~MemoryBufferedStream | ( | ) | [inline] |
The only allowed destructor.
virtual uint32 Stream::MemoryBufferedStream::currentPosition | ( | ) | const [inline, virtual] |
This method returns the position of the next byte that could be read from this stream.
Implements Stream::BaseStream.
virtual bool Stream::MemoryBufferedStream::endReached | ( | ) | const [inline, virtual] |
virtual uint32 Stream::MemoryBufferedStream::fullSize | ( | ) | const [inline, virtual] |
This method returns the stream length in byte, if known If the length is equal or higher than 2^32 - 1, the returned value is 0xfffffffe.
Implements Stream::BaseStream.
uint8* Stream::MemoryBufferedStream::getBuffer | ( | ) | [inline] |
Get the buffer.
virtual bool Stream::MemoryBufferedStream::goForward | ( | const uint32 & | skipAmount | ) | [inline, virtual] |
Move the stream position forward of the given amount This should give the same results as setPosition(currentPosition() + value), but implementation can be faster for non-seek-able stream.
Implements Stream::BaseStream.
virtual uint32 Stream::MemoryBufferedStream::read | ( | void *const | buffer, | |
const uint32 & | size | |||
) | const throw () [inline, virtual] |
Try to read the given amount of data to the specified buffer.
Implements Stream::InputStream.
virtual bool Stream::MemoryBufferedStream::setPosition | ( | const uint32 & | newPos | ) | [inline, virtual] |
Try to seek to the given absolute position (return false if not supported).
Implements Stream::BaseStream.