OFSeekableStream Class Reference

A stream that supports seeking. More...

#import <OFSeekableStream.h>

Inheritance diagram for OFSeekableStream:
OFStream OFObject OFFile

List of all members.

Public Member Functions

(void) - seekToOffset:
(off_t) - seekForwardWithOffset:
(off_t) - seekToOffsetRelativeToEnd:

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:
offset The offset relative to the current location
Returns:
The absolute offset
- (void) seekToOffset: (off_t)  offset  

Seeks to the specified absolute offset.

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

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

Parameters:
offset The 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
Generated on Sun May 9 16:52:22 2010 for ObjFW by  doxygen 1.6.3