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

public Interface CloseableConsumer

Imports
java.io.Closeable, .IOException

Callback that is informed about a closable resource that has been wrapped around a passed in stream or channel by Expander or Archiver when Expander or Archiver no longer need them.

This provides a way to close said resources in the calling code.

Since
1.19

Field Summary

Modifier and TypeField and Description
public static final CloseableConsumer
CLOSING_CONSUMER

Closes the passed in Closeable immediately.

public static final CloseableConsumer
NULL_CONSUMER

Ignores the passed in Closeable.

Method Summary

Modifier and TypeMethod and Description
public void
accept(Closeable
Closeable created by Expander or Archiver that is now no longer used
c
)

Callback that is informed about a Closeable resource that has been wrapped around a passed in stream or channel by Expander or Archiver when Expander or Archiver no longer need them.

Field Detail

CLOSING_CONSUMERback to summary
public static final CloseableConsumer CLOSING_CONSUMER

Closes the passed in Closeable immediately.

NULL_CONSUMERback to summary
public static final CloseableConsumer NULL_CONSUMER

Ignores the passed in Closeable.

Method Detail

acceptback to summary
public void accept(Closeable c) throws IOException

Callback that is informed about a Closeable resource that has been wrapped around a passed in stream or channel by Expander or Archiver when Expander or Archiver no longer need them.

Parameters
c:Closeable

Closeable created by Expander or Archiver that is now no longer used

Exceptions
IOException:
on error