Package org.apache.flink.core.fs
Class ClosingFSDataInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.flink.core.fs.FSDataInputStream
-
- org.apache.flink.core.fs.FSDataInputStreamWrapper
-
- org.apache.flink.core.fs.ClosingFSDataInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable,WrappingProxyCloseable<FSDataInputStream>,WrappingProxy<FSDataInputStream>
@Internal public class ClosingFSDataInputStream extends FSDataInputStreamWrapper implements WrappingProxyCloseable<FSDataInputStream>
This class is aWrappingProxyforFSDataInputStreamthat is used to implement a safety net against unclosed streams.See
SafetyNetCloseableRegistryfor more details on how this is utilized.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.core.fs.FSDataInputStreamWrapper
inputStream
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanequals(Object obj)inthashCode()booleanisClosed()StringtoString()static ClosingFSDataInputStreamwrapSafe(FSDataInputStream delegate, SafetyNetCloseableRegistry registry)static ClosingFSDataInputStreamwrapSafe(FSDataInputStream delegate, SafetyNetCloseableRegistry registry, String debugInfo)-
Methods inherited from class org.apache.flink.core.fs.FSDataInputStreamWrapper
available, getPos, getWrappedDelegate, mark, markSupported, read, read, read, reset, seek, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.util.WrappingProxy
getWrappedDelegate
-
-
-
-
Method Detail
-
isClosed
public boolean isClosed()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFSDataInputStreamWrapper- Throws:
IOException
-
wrapSafe
public static ClosingFSDataInputStream wrapSafe(FSDataInputStream delegate, SafetyNetCloseableRegistry registry) throws IOException
- Throws:
IOException
-
wrapSafe
public static ClosingFSDataInputStream wrapSafe(FSDataInputStream delegate, SafetyNetCloseableRegistry registry, String debugInfo) throws IOException
- Throws:
IOException
-
-