This is an automated email from the ASF dual-hosted git repository. bodewig pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit 1a14a23a05f7104e3d41a25a0f7e78ae1556285e Author: Stefan Bodewig <bode...@apache.org> AuthorDate: Fri Aug 9 17:18:06 2019 +0200 COMPRESS-486 improve documentation --- .../apache/commons/compress/archivers/examples/Archiver.java | 6 ++++-- .../commons/compress/archivers/examples/CloseableConsumer.java | 10 ++++++---- .../apache/commons/compress/archivers/examples/Expander.java | 9 ++++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/commons/compress/archivers/examples/Archiver.java b/src/main/java/org/apache/commons/compress/archivers/examples/Archiver.java index 8623862..a47d8fe 100644 --- a/src/main/java/org/apache/commons/compress/archivers/examples/Archiver.java +++ b/src/main/java/org/apache/commons/compress/archivers/examples/Archiver.java @@ -112,7 +112,8 @@ public class Archiver { * the caller of this method is responsible for closing it - * probably at the same time as closing the stream itself. The * caller is informed about the wrapper object via the {@code - * closeableConsumer} callback</p> + * closeableConsumer} callback as soon as it is no longer needed + * by this class.</p> * * @param format the archive format. This uses the same format as * accepted by {@link ArchiveStreamFactory}. @@ -164,7 +165,8 @@ public class Archiver { * the caller of this method is responsible for closing it - * probably at the same time as closing the channel itself. The * caller is informed about the wrapper object via the {@code - * closeableConsumer} callback</p> + * closeableConsumer} callback as soon as it is no longer needed + * by this class.</p> * * @param format the archive format. This uses the same format as * accepted by {@link ArchiveStreamFactory}. diff --git a/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java b/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java index 1c84bbf..670bf40 100644 --- a/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java +++ b/src/main/java/org/apache/commons/compress/archivers/examples/CloseableConsumer.java @@ -22,8 +22,9 @@ import java.io.Closeable; import java.io.IOException; /** - * Is informed about a closable resource that has been wrapped around - * a passed in stream or channel by Expander or Archiver. + * 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. * * <p>This provides a way to close said resources in the calling code.</p> * @@ -49,8 +50,9 @@ public interface CloseableConsumer { }; /** - * Is informed about a closable resource that has been wrapped around - * a passed in stream or channel by Expander or Archiver. + * 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. */ void accept(Closeable c) throws IOException; } diff --git a/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java b/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java index 44998d9..54ad228 100644 --- a/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java +++ b/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java @@ -123,7 +123,8 @@ public class Expander { * the caller of this method is responsible for closing it - * probably at the same time as closing the stream itself. The * caller is informed about the wrapper object via the {@code - * closeableConsumer} callback</p> + * closeableConsumer} callback as soon as it is no longer needed + * by this class.</p> * * @param archive the file to expand * @param targetDirectory the directory to write to @@ -169,7 +170,8 @@ public class Expander { * the caller of this method is responsible for closing it - * probably at the same time as closing the stream itself. The * caller is informed about the wrapper object via the {@code - * closeableConsumer} callback</p> + * closeableConsumer} callback as soon as it is no longer needed + * by this class.</p> * * @param archive the file to expand * @param targetDirectory the directory to write to @@ -217,7 +219,8 @@ public class Expander { * the caller of this method is responsible for closing it - * probably at the same time as closing the channel itself. The * caller is informed about the wrapper object via the {@code - * closeableConsumer} callback</p> + * closeableConsumer} callback as soon as it is no longer needed + * by this class.</p> * * @param archive the file to expand * @param targetDirectory the directory to write to