@Deprecated public abstract class AbstractCloseableHandle extends Object implements Closeable, Serializable
Constructor and Description |
---|
AbstractCloseableHandle()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Closes the handle.
|
void |
ensureNotClosed()
Deprecated.
This method checks whether the handle is closed and throws an exception if it is closed.
|
boolean |
isClosed()
Deprecated.
Checks whether this handle has been closed.
|
protected void |
registerCloseable(Closeable toClose)
Deprecated.
|
protected final void registerCloseable(Closeable toClose) throws IOException
IOException
public final void close() throws IOException
If a "Closeable" has been registered via registerCloseable(Closeable)
,
then this will be closes.
If any "Closeable" will be registered via registerCloseable(Closeable)
in the future,
it will immediately be closed and that method will throw an exception.
close
in interface Closeable
close
in interface AutoCloseable
IOException
- Exceptions occurring while closing an already registered Closeable
are forwarded.registerCloseable(Closeable)
public boolean isClosed()
public void ensureNotClosed() throws IOException
IOException
- Thrown, if the handle has been closed.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.