Class FsSegmentDataInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.flink.core.fs.FSDataInputStream
-
- org.apache.flink.core.fs.FSDataInputStreamWrapper
-
- org.apache.flink.runtime.state.filesystem.FsSegmentDataInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.flink.core.fs.WrappingProxyCloseable<org.apache.flink.core.fs.FSDataInputStream>,org.apache.flink.util.WrappingProxy<org.apache.flink.core.fs.FSDataInputStream>
public class FsSegmentDataInputStream extends org.apache.flink.core.fs.FSDataInputStreamWrapper implements org.apache.flink.core.fs.WrappingProxyCloseable<org.apache.flink.core.fs.FSDataInputStream>This class is aWrappingProxyforFSDataInputStreamthat is used to read from a file segment. It is opened with a starting position of the file. It treats the argument of seek(long) as an offset relative to the starting position, rather than an absolute value.
-
-
Constructor Summary
Constructors Constructor Description FsSegmentDataInputStream(org.apache.flink.core.fs.FSDataInputStream inputStream, long startingPosition, long segmentSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetPos()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidreset()voidseek(long desired)longskip(long n)-
Methods inherited from class org.apache.flink.core.fs.FSDataInputStreamWrapper
available, close, getWrappedDelegate
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
FsSegmentDataInputStream
public FsSegmentDataInputStream(org.apache.flink.core.fs.FSDataInputStream inputStream, long startingPosition, long segmentSize) throws IOException- Throws:
IOException
-
-
Method Detail
-
read
public int read() throws IOException- Overrides:
readin classorg.apache.flink.core.fs.FSDataInputStreamWrapper- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Overrides:
readin classorg.apache.flink.core.fs.FSDataInputStreamWrapper- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classorg.apache.flink.core.fs.FSDataInputStreamWrapper- Throws:
IOException
-
seek
public void seek(long desired) throws IOException- Overrides:
seekin classorg.apache.flink.core.fs.FSDataInputStreamWrapper- Throws:
IOException
-
getPos
public long getPos() throws IOException- Overrides:
getPosin classorg.apache.flink.core.fs.FSDataInputStreamWrapper- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classorg.apache.flink.core.fs.FSDataInputStreamWrapper- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classorg.apache.flink.core.fs.FSDataInputStreamWrapper
-
reset
public void reset() throws IOException- Overrides:
resetin classorg.apache.flink.core.fs.FSDataInputStreamWrapper- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classorg.apache.flink.core.fs.FSDataInputStreamWrapper
-
-