Package org.aksw.commons.io.hadoop
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,org.aksw.commons.io.input.HasPosition,org.apache.hadoop.fs.Seekable
public class SeekableInputStream extends org.apache.commons.io.input.ProxyInputStream implements SeekableDecorator, org.aksw.commons.io.input.HasPosition
Combines Hadoop's Seekable and InputStream into one class
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.hadoop.fs.Seekableseekable-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description SeekableInputStream(InputStream proxy, org.apache.hadoop.fs.Seekable seekable)Constructs a new ProxyInputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.hadoop.fs.SeekablegetSeekable()longposition()voidposition(long pos)-
Methods inherited from class org.apache.commons.io.input.ProxyInputStream
afterRead, available, beforeRead, close, handleIOException, mark, markSupported, read, read, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.aksw.commons.io.hadoop.SeekableDecorator
getPos, seek, seekToNewSource
-
-
-
-
Constructor Detail
-
SeekableInputStream
public SeekableInputStream(InputStream proxy, org.apache.hadoop.fs.Seekable seekable)
Constructs a new ProxyInputStream.- Parameters:
proxy- the InputStream to delegate to
-
-
Method Detail
-
getSeekable
public org.apache.hadoop.fs.Seekable getSeekable()
- Specified by:
getSeekablein interfaceSeekableDecorator
-
position
public long position()
- Specified by:
positionin interfaceorg.aksw.commons.io.input.HasPosition
-
position
public void position(long pos)
- Specified by:
positionin interfaceorg.aksw.commons.io.input.HasPosition
-
-