ObjFW
|
A stream that supports seeking. More...
#include <OFSeekableStream.h>
Public Member Functions | |
void | seekToOffset: (off_t offset) |
off_t | seekForwardWithOffset: (off_t offset) |
off_t | seekToOffsetRelativeToEnd: (off_t offset) |
A stream that supports seeking.
IMPORTANT: If you want to subclass this, override _seekToOffset:, _seekForwardWithOffset: and _seekToOffsetRelativeToEnd:, but nothing else. Those are not defined in the headers, but do the actual work. OFSeekableStream uses those and makes them work together with the caching of OFStream. If you override these methods without the _ prefix, you *WILL* break caching, get broken results and seek to the wrong position!
off_t OFSeekableStream::seekForwardWithOffset: | ( | off_t | offset | ) | [virtual] |
Seeks to the specified offset, relative to the current location.
offset | The offset relative to the current location |
void OFSeekableStream::seekToOffset: | ( | off_t | offset | ) | [virtual] |
Seeks to the specified absolute offset.
offset | The offset in bytes |
off_t OFSeekableStream::seekToOffsetRelativeToEnd: | ( | off_t | offset | ) | [virtual] |
Seeks to the specified offset, relative to the end of the stream.
offset | The offset relative to the end of the stream |