CloseableDisposerRecordpublic class CloseableDisposerRecord extends Object implements DisposerRecordConvenience class that closes a given resource (e.g. RandomAccessFile),
typically associated with an Image{Input,Output}Stream, prior to the
stream being garbage collected. |
Fields Summary |
---|
private Closeable | closeable |
Constructors Summary |
---|
public CloseableDisposerRecord(Closeable closeable)
this.closeable = closeable;
|
Methods Summary |
---|
public synchronized void | dispose()
if (closeable != null) {
try {
closeable.close();
} catch (IOException e) {
} finally {
closeable = null;
}
}
|
|