Seekable

Seekable stream interface

Description: Represents a stream container that knows the size of a stream and allows to change byte position within the stream.

Members

Functions

getPosition
StreamPos getPosition()

Returns current position

position
StreamPos position(StreamPos pos)
StreamPos position()

Attempts to set current position to pos. Throws SeekException on failure

seek
StreamPos seek(StreamOffset amount)

Relatively changes position. amount defines an offset from the current position (can be negative). Throws SeekException on failure

setPosition
bool setPosition(StreamPos pos)

Attempts to set current position to pos. Returns true on success, false on failure

size
StreamSize size()

Returns the size of a stream in bytes

Meta