Package net.sansa_stack.hadoop.util
Class SeekableInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.io.input.ProxyInputStream
net.sansa_stack.hadoop.util.SeekableInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable,SeekableDecorator,org.apache.hadoop.fs.Seekable
public class SeekableInputStream
extends org.apache.commons.io.input.ProxyInputStream
implements SeekableDecorator
A basic wrapper that combines Hadoop's Seekable and InputStream into one class.
Because InputStream is not an interface we have to work which such a wrapper class
if we want the methods of both combined.
-
Field Summary
FieldsFields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionSeekableInputStream(InputStream in, org.apache.hadoop.fs.Seekable seekable) Constructs a new ProxyInputStream. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.fs.SeekableYou should not change the position of the underlying seekable directly while this input stream is in use.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 java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferToMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sansa_stack.hadoop.util.SeekableDecorator
getPos, seek, seekToNewSource
-
Field Details
-
seekable
protected org.apache.hadoop.fs.Seekable seekable
-
-
Constructor Details
-
SeekableInputStream
-
SeekableInputStream
Constructs a new ProxyInputStream.
-
-
Method Details
-
getSeekable
public org.apache.hadoop.fs.Seekable getSeekable()You should not change the position of the underlying seekable directly while this input stream is in use. Conversely, only use this class' seek methods for changing the position. Otherwise it my result in an inconsistent state.- Specified by:
getSeekablein interfaceSeekableDecorator- Returns:
- The underlying seekable.
-