DataSourceImpl

This class represents an abstract data source object.

Members

Functions

discardNext
size_t discardNext(size_t n)

Discard the next N bytes of the data

endOfData
bool endOfData()

Test whether the source still has data that can be read.

getBytesRead
size_t getBytesRead()
id
string id()

return the id of this data source

peek
size_t peek(ubyte* output, size_t length, size_t peek_offset)

Read from the source but do not modify the internal offset. Consecutive calls to peek() will return portions of the source starting at the same position.

peekByte
size_t peekByte(ubyte output)

Peek at one ubyte.

read
size_t read(ubyte* output, size_t length)

Read from the source. Moves the internal offset so that every call to read will return a new portion of the source.

readByte
size_t readByte(ubyte output)

Read one ubyte.

Meta