@Internal public class ClosingFSDataOutputStream extends FSDataOutputStreamWrapper implements WrappingProxyCloseable<FSDataOutputStream>
WrappingProxy
for FSDataOutputStream
that is used to
implement a safety net against unclosed streams.
See SafetyNetCloseableRegistry
for more details on how this is utilized.
outputStream
Constructor and Description |
---|
ClosingFSDataOutputStream(FSDataOutputStream delegate,
SafetyNetCloseableRegistry registry) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isClosed() |
String |
toString() |
static ClosingFSDataOutputStream |
wrapSafe(FSDataOutputStream delegate,
SafetyNetCloseableRegistry registry) |
static ClosingFSDataOutputStream |
wrapSafe(FSDataOutputStream delegate,
SafetyNetCloseableRegistry registry,
String debugInfo) |
flush, getPos, getWrappedDelegate, sync, write, write, write
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getWrappedDelegate
public ClosingFSDataOutputStream(FSDataOutputStream delegate, SafetyNetCloseableRegistry registry) throws IOException
IOException
public boolean isClosed()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FSDataOutputStreamWrapper
IOException
public static ClosingFSDataOutputStream wrapSafe(FSDataOutputStream delegate, SafetyNetCloseableRegistry registry) throws IOException
IOException
public static ClosingFSDataOutputStream wrapSafe(FSDataOutputStream delegate, SafetyNetCloseableRegistry registry, String debugInfo) throws IOException
IOException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.