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 2022/12/11 06:07:34 UTC
[commons-compress] 02/02: 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
commit 0082648ee4f23ddc9ec643a841feb56f4c8887d0
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Dec 11 01:07:28 2022 -0500
Javadoc
---
.../archivers/tar/TarArchiveSparseZeroInputStream.java | 9 +++++----
.../commons/compress/archivers/zip/CircularBuffer.java | 12 +++++++++---
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseZeroInputStream.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseZeroInputStream.java
index 740e44e7..2598379c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseZeroInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveSparseZeroInputStream.java
@@ -21,14 +21,15 @@ import java.io.IOException;
import java.io.InputStream;
/**
- * This is an inputstream that always return 0,
+ * This is an InputStream that always return 0,
* this is used when reading the "holes" of a sparse file
*/
class TarArchiveSparseZeroInputStream extends InputStream {
/**
- * Just return 0
- * @return
+ * Returns 0.
+ *
+ * @return 0
* @throws IOException
*/
@Override
@@ -37,7 +38,7 @@ class TarArchiveSparseZeroInputStream extends InputStream {
}
/**
- * these's nothing need to do when skipping
+ * Returns the input.
*
* @param n bytes to skip
* @return bytes actually skipped
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java b/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java
index 69b15976..ba1c3b2a 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java
@@ -44,14 +44,18 @@ class CircularBuffer {
}
/**
- * Tells if a new byte can be read from the buffer.
+ * Tests whether a new byte can be read from the buffer.
+ *
+ * @return Whether a new byte can be read from the buffer.
*/
public boolean available() {
return readIndex != writeIndex;
}
/**
- * Writes a byte to the buffer.
+ * Puts a byte to the buffer.
+ *
+ * @param value the value to put.
*/
public void put(final int value) {
buffer[writeIndex] = (byte) value;
@@ -60,6 +64,8 @@ class CircularBuffer {
/**
* Reads a byte from the buffer.
+ *
+ * @return a byte from the buffer.
*/
public int get() {
if (available()) {
@@ -71,7 +77,7 @@ class CircularBuffer {
}
/**
- * Copy a previous interval in the buffer to the current position.
+ * Copies a previous interval in the buffer to the current position.
*
* @param distance the distance from the current write position
* @param length the number of bytes to copy