Package net.sansa_stack.hadoop.util
Class SeekablePushbackInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.io.PushbackInputStream
-
- net.sansa_stack.hadoop.util.SeekablePushbackInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,SeekableDecorator
,org.apache.hadoop.fs.Seekable
public class SeekablePushbackInputStream extends PushbackInputStream implements SeekableDecorator
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.hadoop.fs.Seekable
seekable
-
Fields inherited from class java.io.PushbackInputStream
buf, pos
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description SeekablePushbackInputStream(InputStream in, int size)
SeekablePushbackInputStream(InputStream in, org.apache.hadoop.fs.Seekable seekable, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterSeek()
org.apache.hadoop.fs.Seekable
getSeekable()
void
seek(long l)
boolean
seekToNewSource(long l)
-
Methods inherited from class java.io.PushbackInputStream
available, close, mark, markSupported, read, read, reset, skip, unread, unread, unread
-
Methods inherited from class java.io.FilterInputStream
read
-
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 net.sansa_stack.hadoop.util.SeekableDecorator
getPos
-
-
-
-
Constructor Detail
-
SeekablePushbackInputStream
public SeekablePushbackInputStream(InputStream in, int size)
-
SeekablePushbackInputStream
public SeekablePushbackInputStream(InputStream in, org.apache.hadoop.fs.Seekable seekable, int size)
-
-
Method Detail
-
getSeekable
public org.apache.hadoop.fs.Seekable getSeekable()
- Specified by:
getSeekable
in interfaceSeekableDecorator
-
afterSeek
protected void afterSeek()
-
seek
public void seek(long l) throws IOException
- Specified by:
seek
in interfaceorg.apache.hadoop.fs.Seekable
- Specified by:
seek
in interfaceSeekableDecorator
- Throws:
IOException
-
seekToNewSource
public boolean seekToNewSource(long l) throws IOException
- Specified by:
seekToNewSource
in interfaceorg.apache.hadoop.fs.Seekable
- Specified by:
seekToNewSource
in interfaceSeekableDecorator
- Throws:
IOException
-
-