Package org.apache.flink.runtime.state
Class BoundedInputStream
java.lang.Object
java.io.InputStream
org.apache.flink.runtime.state.BoundedInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Wrapper around a FSDataInputStream to limit the maximum read offset.
Based on the implementation from org.apache.commons.io.input.BoundedInputStream
-
Constructor Summary
ConstructorsConstructorDescriptionBoundedInputStream(org.apache.flink.core.fs.FSDataInputStream delegate, long endOffsetExclusive) -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Constructor Details
-
BoundedInputStream
public BoundedInputStream(org.apache.flink.core.fs.FSDataInputStream delegate, long endOffsetExclusive) throws IOException - Throws:
IOException
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
toString
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
getEndOffsetExclusive
public long getEndOffsetExclusive() -
setEndOffsetExclusive
public void setEndOffsetExclusive(long endOffsetExclusive) -
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-