Package org.apache.flink.core.fs
Class FSDataInputStreamWrapper
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.flink.core.fs.FSDataInputStream
-
- org.apache.flink.core.fs.FSDataInputStreamWrapper
-
- All Implemented Interfaces:
Closeable,AutoCloseable,WrappingProxy<FSDataInputStream>
- Direct Known Subclasses:
ClosingFSDataInputStream
@Internal public class FSDataInputStreamWrapper extends FSDataInputStream implements WrappingProxy<FSDataInputStream>
Simple forwarding wrapper aroundFSDataInputStream.
-
-
Field Summary
Fields Modifier and Type Field Description protected FSDataInputStreaminputStream
-
Constructor Summary
Constructors Constructor Description FSDataInputStreamWrapper(FSDataInputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()longgetPos()Gets the current position in the input stream.FSDataInputStreamgetWrappedDelegate()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidreset()voidseek(long desired)Seek to the given offset from the start of the file.longskip(long n)-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Field Detail
-
inputStream
protected final FSDataInputStream inputStream
-
-
Constructor Detail
-
FSDataInputStreamWrapper
public FSDataInputStreamWrapper(FSDataInputStream inputStream)
-
-
Method Detail
-
seek
public void seek(long desired) throws IOExceptionDescription copied from class:FSDataInputStreamSeek to the given offset from the start of the file. The next read() will be from that location. Can't seek past the end of the stream.- Specified by:
seekin classFSDataInputStream- Parameters:
desired- the desired offset- Throws:
IOException- Thrown if an error occurred while seeking inside the input stream.
-
getPos
public long getPos() throws IOExceptionDescription copied from class:FSDataInputStreamGets the current position in the input stream.- Specified by:
getPosin classFSDataInputStream- Returns:
- current position in the input stream
- Throws:
IOException- Thrown if an I/O error occurred in the underlying stream implementation while accessing the stream's position.
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classInputStream- Throws:
IOException
-
available
public int available() throws IOException- Overrides:
availablein classInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classInputStream
-
reset
public void reset() throws IOException- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream
-
getWrappedDelegate
public FSDataInputStream getWrappedDelegate()
- Specified by:
getWrappedDelegatein interfaceWrappingProxy<FSDataInputStream>
-
-