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>
- Direct Known Subclasses:
ByteBufferReadableClosingFSDataInputStream
@Internal public class ClosingFSDataInputStream extends FSDataInputStreamWrapper implements WrappingProxyCloseable<FSDataInputStream>
This class is aWrappingProxy
forFSDataInputStream
that is used to implement a safety net against unclosed streams.See
SafetyNetCloseableRegistry
for more details on how this is utilized.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.core.fs.FSDataInputStreamWrapper
inputStream
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClosingFSDataInputStream(FSDataInputStream delegate, SafetyNetCloseableRegistry registry, String debugInfo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
equals(Object obj)
int
hashCode()
boolean
isClosed()
String
toString()
static ClosingFSDataInputStream
wrapSafe(FSDataInputStream delegate, SafetyNetCloseableRegistry registry)
static ClosingFSDataInputStream
wrapSafe(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
-
-
-
-
Constructor Detail
-
ClosingFSDataInputStream
protected ClosingFSDataInputStream(FSDataInputStream delegate, SafetyNetCloseableRegistry registry, String debugInfo) throws IOException
- Throws:
IOException
-
-
Method Detail
-
isClosed
public boolean isClosed()
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in 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
-
-