ObjFW
Public Member Functions
OFSeekableStream Class Reference

A stream that supports seeking. More...

#import <OFSeekableStream.h>

Inheritance diagram for OFSeekableStream:
OFStream OFObject <OFCopying> <OFObject> OFFile

List of all members.

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.

Detailed Description

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!


Member Function Documentation

- (off_t) seekForwardWithOffset: (off_t)  offset

Seeks to the specified offset, relative to the current location.

Parameters:
offsetThe offset relative to the current location
Returns:
The absolute offset
- (void) seekToOffset: (off_t)  offset

Seeks to the specified absolute offset.

Parameters:
offsetThe offset in bytes
- (off_t) seekToOffsetRelativeToEnd: (off_t)  offset

Seeks to the specified offset, relative to the end of the stream.

Parameters:
offsetThe offset relative to the end of the stream
Returns:
The absolute offset

The documentation for this class was generated from the following files:
 All Classes Functions Variables Properties