You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/01/12 15:41:50 UTC

[commons-compress] branch master updated: Format tweaks and Javadoc

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new 4619e3c2 Format tweaks and Javadoc
4619e3c2 is described below

commit 4619e3c28b84d1be8ed830f7f0c52fb01012edf8
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jan 12 10:41:46 2023 -0500

    Format tweaks and Javadoc
---
 .../archivers/zip/ScatterZipOutputStream.java      | 23 +++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
index b669a412..7a30df6f 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
@@ -50,6 +50,7 @@ import org.apache.commons.compress.utils.BoundedInputStream;
  * @since 1.10
  */
 public class ScatterZipOutputStream implements Closeable {
+
     private static class CompressedEntry {
         final ZipArchiveEntryRequest zipArchiveEntryRequest;
         final long crc;
@@ -64,12 +65,12 @@ public class ScatterZipOutputStream implements Closeable {
         }
 
         /**
-         * Update the original {@link ZipArchiveEntry} with sizes/crc
+         * Updates the original {@link ZipArchiveEntry} with sizes/crc
          * Do not use this methods from threads that did not create the instance itself !
          * @return the zipArchiveEntry that is basis for this request
          */
 
-        public ZipArchiveEntry transferToArchiveEntry(){
+        public ZipArchiveEntry transferToArchiveEntry() {
             final ZipArchiveEntry entry = zipArchiveEntryRequest.getZipArchiveEntry();
             entry.setCompressedSize(compressedSize);
             entry.setSize(size);
@@ -78,6 +79,7 @@ public class ScatterZipOutputStream implements Closeable {
             return entry;
         }
     }
+
     public static class ZipEntryWriter implements Closeable {
         private final Iterator<CompressedEntry> itemsIterator;
         private final InputStream itemsIteratorData;
@@ -102,8 +104,9 @@ public class ScatterZipOutputStream implements Closeable {
             }
         }
     }
+
     /**
-     * Create a {@link ScatterZipOutputStream} with default compression level that is backed by a file
+     * Creates a {@link ScatterZipOutputStream} with default compression level that is backed by a file
      *
      * @param file The file to offload compressed data into.
      * @return A ScatterZipOutputStream that is ready for use.
@@ -112,8 +115,9 @@ public class ScatterZipOutputStream implements Closeable {
     public static ScatterZipOutputStream fileBased(final File file) throws FileNotFoundException {
         return pathBased(file.toPath(), Deflater.DEFAULT_COMPRESSION);
     }
+
     /**
-     * Create a {@link ScatterZipOutputStream} that is backed by a file
+     * Creates a {@link ScatterZipOutputStream} that is backed by a file
      *
      * @param file             The file to offload compressed data into.
      * @param compressionLevel The compression level to use, @see #Deflater
@@ -123,8 +127,9 @@ public class ScatterZipOutputStream implements Closeable {
     public static ScatterZipOutputStream fileBased(final File file, final int compressionLevel) throws FileNotFoundException {
         return pathBased(file.toPath(), compressionLevel);
     }
+
     /**
-     * Create a {@link ScatterZipOutputStream} with default compression level that is backed by a file
+     * Creates a {@link ScatterZipOutputStream} with default compression level that is backed by a file
      * @param path The path to offload compressed data into.
      * @return A ScatterZipOutputStream that is ready for use.
      * @throws FileNotFoundException if the path cannot be found
@@ -135,7 +140,7 @@ public class ScatterZipOutputStream implements Closeable {
     }
 
     /**
-     * Create a {@link ScatterZipOutputStream} that is backed by a file
+     * Creates a {@link ScatterZipOutputStream} that is backed by a file
      * @param path The path to offload compressed data into.
      * @param compressionLevel The compression level to use, @see #Deflater
      * @return A ScatterZipOutputStream that is ready for use.
@@ -166,7 +171,7 @@ public class ScatterZipOutputStream implements Closeable {
     }
 
     /**
-     * Add an archive entry to this scatter stream.
+     * Adds an archive entry to this scatter stream.
      *
      * @param zipArchiveEntryRequest The entry to write.
      * @throws IOException    If writing fails
@@ -199,7 +204,7 @@ public class ScatterZipOutputStream implements Closeable {
     }
 
     /**
-     * Write the contents of this scatter stream to a target archive.
+     * Writes the contents of this scatter stream to a target archive.
      *
      * @param target The archive to receive the contents of this {@link ScatterZipOutputStream}.
      * @throws IOException If writing fails
@@ -218,7 +223,7 @@ public class ScatterZipOutputStream implements Closeable {
     }
 
     /**
-     * Get a zip entry writer for this scatter stream.
+     * Gets a zip entry writer for this scatter stream.
      * @throws IOException If getting scatter stream input stream
      * @return the ZipEntryWriter created on first call of the method
      */