@@ -715,42 +715,17 @@ stream: self requestedLength: length]; } - (void)lowlevelSeekToOffset: (off_t)offset -{ - if (lseek(fd, offset, SEEK_SET) == -1) - @throw [OFSeekFailedException exceptionWithClass: [self class] - stream: self - offset: offset - whence: SEEK_SET]; -} - -- (off_t)lowlevelSeekForwardWithOffset: (off_t)offset -{ - off_t ret; - - if ((ret = lseek(fd, offset, SEEK_CUR)) == -1) - @throw [OFSeekFailedException exceptionWithClass: [self class] - stream: self - offset: offset - whence: SEEK_CUR]; - - return ret; -} - -- (off_t)lowlevelSeekToOffsetRelativeToEnd: (off_t)offset -{ - off_t ret; - - if ((ret = lseek(fd, offset, SEEK_END)) == -1) - @throw [OFSeekFailedException exceptionWithClass: [self class] - stream: self - offset: offset - whence: SEEK_END]; - - return ret; + whence: (int)whence +{ + if (lseek(fd, offset, whence) == -1) + @throw [OFSeekFailedException exceptionWithClass: [self class] + stream: self + offset: offset + whence: whence]; } - (int)fileDescriptorForReading { return fd; @@ -820,22 +795,11 @@ selector: _cmd]; [super dealloc]; /* Get rid of stupid warning */ } - (void)lowlevelSeekToOffset: (off_t)offset -{ - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; -} - -- (off_t)lowlevelSeekForwardWithOffset: (off_t)offset -{ - @throw [OFNotImplementedException exceptionWithClass: [self class] - selector: _cmd]; -} - -- (off_t)lowlevelSeekToOffsetRelativeToEnd: (off_t)offset + whence: (int)whence { @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } @end