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 2024/01/17 15:16:15 UTC

(commons-compress) branch master updated (e8882a283 -> 8c3210902)

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

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


    from e8882a283 Javadoc
     new f5c19de69 Javadoc
     new 06f9b7c5b Javadoc
     new 8c3210902 Javadoc

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../archivers/arj/ArjArchiveInputStream.java         |  7 ++++---
 .../archivers/cpio/CpioArchiveInputStream.java       | 13 +++++++------
 .../compress/archivers/dump/DumpArchiveEntry.java    | 20 ++++++++++----------
 .../archivers/dump/DumpArchiveInputStream.java       | 12 ++++++------
 .../compress/archivers/zip/StreamCompressor.java     |  2 +-
 .../commons/compress/compressors/bzip2/Rand.java     |  2 +-
 6 files changed, 29 insertions(+), 27 deletions(-)


(commons-compress) 02/03: Javadoc

Posted by gg...@apache.org.
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

commit 06f9b7c5b902d49308189b31e85cb678d9711fff
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Jan 17 10:13:56 2024 -0500

    Javadoc
---
 .../compress/archivers/cpio/CpioArchiveInputStream.java     | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
index 620f9dca5..813f73520 100644
--- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
@@ -33,12 +33,10 @@ import org.apache.commons.compress.utils.ParsingUtils;
 /**
  * CpioArchiveInputStream is a stream for reading cpio streams. All formats of cpio are supported (old ascii, old binary, new portable format and the new
  * portable format with crc).
- *
  * <p>
  * The stream can be read by extracting a cpio entry (containing all information about an entry) and afterwards reading from the stream the file specified by
  * the entry.
  * </p>
- *
  * <pre>
  * CpioArchiveInputStream cpioIn = new CpioArchiveInputStream(Files.newInputStream(Paths.get(&quot;test.cpio&quot;)));
  * CpioArchiveEntry cpioEntry;
@@ -56,14 +54,14 @@ import org.apache.commons.compress.utils.ParsingUtils;
  * </pre>
  * <p>
  * Note: This implementation should be compatible to cpio 2.5
- *
+ * </p>
  * <p>
  * This class uses mutable fields and is not considered to be threadsafe.
- *
+ * </p>
  * <p>
  * Based on code from the jRPM project (jrpm.sourceforge.net)
+ * </p>
  */
-
 public class CpioArchiveInputStream extends ArchiveInputStream<CpioArchiveEntry> implements CpioConstants {
 
     /**
@@ -137,8 +135,10 @@ public class CpioArchiveInputStream extends ArchiveInputStream<CpioArchiveEntry>
 
     private long crc;
 
-    // cached buffers - must only be used locally in the class (COMPRESS-172 - reduce garbage collection)
+    /** Cached buffer - must only be used locally in the class (COMPRESS-172 - reduce garbage collection). */
     private final byte[] twoBytesBuf = new byte[2];
+
+    /** Cached buffer - must only be used locally in the class (COMPRESS-172 - reduce garbage collection). */
     private final byte[] fourBytesBuf = new byte[4];
 
     private final byte[] sixBytesBuf = new byte[6];
@@ -204,6 +204,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream<CpioArchiveEntry>
      * Returns 0 after EOF has reached for the current entry data, otherwise always return 1.
      * <p>
      * Programs should not count on this method to return the actual number of bytes that could be read without blocking.
+     * </p>
      *
      * @return 1 before EOF and 0 after EOF has reached for current entry.
      * @throws IOException if an I/O error has occurred or if a CPIO file error has occurred


(commons-compress) 03/03: Javadoc

Posted by gg...@apache.org.
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

commit 8c32109021de0fe42b76a9f86811fb6921b6e9d6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Jan 17 10:16:09 2024 -0500

    Javadoc
---
 .../compress/archivers/dump/DumpArchiveEntry.java    | 20 ++++++++++----------
 .../archivers/dump/DumpArchiveInputStream.java       | 12 ++++++------
 .../compress/archivers/zip/StreamCompressor.java     |  2 +-
 .../commons/compress/compressors/bzip2/Rand.java     |  2 +-
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
index c75bae350..48f93df9e 100644
--- a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
@@ -442,7 +442,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
     }
 
     /**
-     * Return the generation of the file.
+     * Gets the generation of the file.
      *
      * @return the generation
      */
@@ -451,7 +451,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
     }
 
     /**
-     * Return the group id
+     * Gets the group id
      *
      * @return the group id
      */
@@ -460,7 +460,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
     }
 
     /**
-     * Return the number of records in this segment.
+     * Gets the number of records in this segment.
      *
      * @return the number of records
      */
@@ -469,7 +469,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
     }
 
     /**
-     * Return the number of sparse records in this segment.
+     * Gets the number of sparse records in this segment.
      *
      * @return the number of sparse records
      */
@@ -478,7 +478,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
     }
 
     /**
-     * Return the type of the tape segment header.
+     * Gets the type of the tape segment header.
      *
      * @return the segment header
      */
@@ -506,7 +506,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
     }
 
     /**
-     * Return the access permissions on the entry.
+     * Gets the access permissions on the entry.
      *
      * @return the access permissions
      */
@@ -529,7 +529,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
     }
 
     /**
-     * Return the number of hard links to the entry.
+     * Gets the number of hard links to the entry.
      *
      * @return the number of hard links
      */
@@ -538,7 +538,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
     }
 
     /**
-     * Return the offset within the archive
+     * Gets the offset within the archive
      *
      * @return the offset
      */
@@ -593,7 +593,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
     }
 
     /**
-     * Return the user id.
+     * Gets the user id.
      *
      * @return the user id
      */
@@ -602,7 +602,7 @@ public class DumpArchiveEntry implements ArchiveEntry {
     }
 
     /**
-     * Return the tape volume where this file is located.
+     * Gets the tape volume where this file is located.
      *
      * @return the volume
      */
diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
index 82454c6e4..f76df65d2 100644
--- a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
@@ -37,10 +37,10 @@ import org.apache.commons.compress.utils.IOUtils;
 /**
  * The DumpArchiveInputStream reads a UNIX dump archive as an InputStream. Methods are provided to position at each successive entry in the archive, and the
  * read each entry as a normal input stream using read().
- *
+ * <p>
  * There doesn't seem to exist a hint on the encoding of string values in any piece documentation. Given the main purpose of dump/restore is backing up a system
  * it seems very likely the format uses the current default encoding of the system.
- *
+ * </p>
  * @NotThreadSafe
  */
 public class DumpArchiveInputStream extends ArchiveInputStream<DumpArchiveEntry> {
@@ -85,13 +85,13 @@ public class DumpArchiveInputStream extends ArchiveInputStream<DumpArchiveEntry>
 
     protected TapeInputStream raw;
 
-    // map of ino -> dirent entry. We can use this to reconstruct full paths.
+    /** Map of ino -> dirent entry. We can use this to reconstruct full paths. */
     private final Map<Integer, Dirent> names = new HashMap<>();
 
-    // map of ino -> (directory) entry when we're missing one or more elements in the path.
+    /** Map of ino -> (directory) entry when we're missing one or more elements in the path. */
     private final Map<Integer, DumpArchiveEntry> pending = new HashMap<>();
 
-    // queue of (directory) entries where we now have the full path.
+    /** Queue of (directory) entries where we now have the full path. */
     private final Queue<DumpArchiveEntry> queue;
 
     /**
@@ -331,7 +331,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream<DumpArchiveEntry>
     }
 
     /**
-     * Return the archive summary information.
+     * Gets the archive summary information.
      *
      * @return the summary
      */
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java b/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
index c2bd12047..7cd92f21c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
@@ -232,7 +232,7 @@ public abstract class StreamCompressor implements Closeable {
     }
 
     /**
-     * Return the number of bytes read from the source stream
+     * Gets the number of bytes read from the source stream
      *
      * @return The number of bytes read, never negative
      */
diff --git a/src/main/java/org/apache/commons/compress/compressors/bzip2/Rand.java b/src/main/java/org/apache/commons/compress/compressors/bzip2/Rand.java
index ec673b517..ed9a7a3bb 100644
--- a/src/main/java/org/apache/commons/compress/compressors/bzip2/Rand.java
+++ b/src/main/java/org/apache/commons/compress/compressors/bzip2/Rand.java
@@ -44,7 +44,7 @@ final class Rand {
             197, 510, 357, 358, 850, 858, 364, 936, 638 };
 
     /**
-     * Return the random number at a specific index.
+     * Gets the random number at a specific index.
      *
      * @param i the index
      * @return the random number


(commons-compress) 01/03: Javadoc

Posted by gg...@apache.org.
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

commit f5c19de69db92d98c73df436b4bbb101b3c22fb5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Jan 17 10:12:29 2024 -0500

    Javadoc
---
 .../commons/compress/archivers/arj/ArjArchiveInputStream.java      | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
index 951e946c0..b956cc62c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
@@ -34,9 +34,10 @@ import org.apache.commons.compress.utils.IOUtils;
 
 /**
  * Implements the "arj" archive format as an InputStream.
- * <p>
- * <a href="https://github.com/FarGroup/FarManager/blob/master/plugins/multiarc/arc.doc/arj.txt">Reference 1</a> <br>
- * <a href="http://www.fileformat.info/format/arj/corion.htm">Reference 2</a>
+ * <ul>
+ * <li><a href="https://github.com/FarGroup/FarManager/blob/master/plugins/multiarc/arc.doc/arj.txt">Reference 1</a></li>
+ * <li><a href="http://www.fileformat.info/format/arj/corion.htm">Reference 2</a></li>
+ * </ul>
  *
  * @NotThreadSafe
  * @since 1.6