Class SeekableInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.io.input.ProxyInputStream
org.aksw.commons.io.hadoop.SeekableInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable, SeekableDecorator, HasPosition, org.apache.hadoop.fs.PositionedReadable, org.apache.hadoop.fs.Seekable
public class SeekableInputStream
extends org.apache.commons.io.input.ProxyInputStream
implements SeekableDecorator, HasPosition, org.apache.hadoop.fs.PositionedReadable
Combines Hadoop's Seekable and InputStream into one class.
-
Field Summary
FieldsFields inherited from class FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionSeekableInputStream(InputStream proxy, org.apache.hadoop.fs.Seekable seekable) Constructs a new ProxyInputStream. -
Method Summary
Methods inherited from class org.apache.commons.io.input.ProxyInputStream
afterRead, available, beforeRead, close, handleIOException, mark, markSupported, read, read, read, reset, skip, unwrapMethods inherited from class InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferToMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.fs.PositionedReadable
maxReadSizeForVectorReads, minSeekForVectorReads, readVectoredMethods inherited from interface SeekableDecorator
getPos, seek, seekToNewSource
-
Field Details
-
seekable
protected org.apache.hadoop.fs.Seekable seekable
-
-
Constructor Details
-
SeekableInputStream
Constructs a new ProxyInputStream.- Parameters:
proxy- the InputStream to delegate to
-
-
Method Details
-
getSeekable
public org.apache.hadoop.fs.Seekable getSeekable()- Specified by:
getSeekablein interfaceSeekableDecorator
-
position
public long position()- Specified by:
positionin interfaceHasPosition
-
position
public void position(long pos) - Specified by:
positionin interfaceHasPosition
-
read
- Specified by:
readin interfaceorg.apache.hadoop.fs.PositionedReadable- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceorg.apache.hadoop.fs.PositionedReadable- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceorg.apache.hadoop.fs.PositionedReadable- Throws:
IOException
-