ObjFW
|
A stream that supports seeking. More...
#import <OFSeekableStream.h>
Public Member Functions | |
(void) | - seekToOffset: |
Seeks to the specified absolute offset. | |
(off_t) | - seekForwardWithOffset: |
Seeks to the specified offset, relative to the current location. | |
(off_t) | - seekToOffsetRelativeToEnd: |
Seeks to the specified offset, relative to the end of the stream. |
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) seekForwardWithOffset: | (off_t) | offset |
Seeks to the specified offset, relative to the current location.
offset | The offset relative to the current location |
- (void) seekToOffset: | (off_t) | offset |
Seeks to the specified absolute offset.
offset | The offset in bytes |
- (off_t) seekToOffsetRelativeToEnd: | (off_t) | offset |
Seeks to the specified offset, relative to the end of the stream.
offset | The offset relative to the end of the stream |