#include <archon/util/stream.H>
Inheritance diagram for Archon::Utilities::Stream::BasicRewindReader< C >:
Public Member Functions | |
int | read (C *buffer, int size) throw (ReadException, UnexpectedException) |
void | rewind () |
Rewind to the start of the stream. | |
void | release () |
Give up the rewind capability from this point and on. | |
Static Public Member Functions | |
static Ref< BasicRewindReader > | get (Ref< ReaderBase< C > > r) |
New RewindReaders are constructed with this method. |
This is usefull in situations such as when you must detect the MIME-type of the stream constents, and you must do this by asking various distinct systems to test for specific types.
The Image class uses this class to determine the image format of input streams.
Definition at line 180 of file stream.H.
|
New RewindReaders are constructed with this method. The real constructor is hidden to prevent creation of automatic variables of this type. |
|
Give up the rewind capability from this point and on. This should be done before reading the entire contents of the stream because the rewind capability requires every bit of retreived data to be stored in a buffer. After calling this method no new data will be buffered and when the current rewind buffer gets empty it will be deallocated. |