org.apache.pig.backend.datastorage
Class SeekableInputStream
java.lang.Object
java.io.InputStream
org.apache.pig.backend.datastorage.SeekableInputStream
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- HSeekableInputStream
public abstract class SeekableInputStream
- extends InputStream
Unix-like API for an input stream that supports random access.
Method Summary |
abstract void |
seek(long offset,
SeekableInputStream.FLAGS whence)
Seeks to a given offset as specified by whence flags. |
abstract long |
tell()
Returns current offset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SeekableInputStream
public SeekableInputStream()
seek
public abstract void seek(long offset,
SeekableInputStream.FLAGS whence)
throws IOException
- Seeks to a given offset as specified by whence flags.
If whence is SEEK_SET, offset is added to beginning of stream
If whence is SEEK_CUR, offset is added to current position inside stream
If whence is SEEK_END, offset is added to end of file position
- Parameters:
offset
- whence
-
- Throws:
IOException
tell
public abstract long tell()
throws IOException
- Returns current offset
- Returns:
- offset
- Throws:
IOException
Copyright © 2012 The Apache Software Foundation