Top Fields Constructors Methods
org.apache.commons.compress.archivers.examples

pack-priv final Class CloseableConsumerAdapter

extends Object
implements Closeable
Class Inheritance
All Implemented Interfaces
java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.Closeable, .IOException, java.util.Objects

Field Summary

Modifier and TypeField and Description
private Closeable
private final CloseableConsumer

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.
pack-priv <C extends Closeable> C
track(final C closeable)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

closeableback to summary
private Closeable closeable
consumerback to summary
private final CloseableConsumer consumer

Constructor Detail

CloseableConsumerAdapterback to summary
pack-priv CloseableConsumerAdapter(final CloseableConsumer consumer)

Method Detail

closeback to summary
public void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
trackback to summary
pack-priv <C extends Closeable> C track(final C closeable)