You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2015/08/12 05:24:07 UTC

svn commit: r1695419 [2/2] - in /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress: archivers/ archivers/ar/ archivers/arj/ archivers/cpio/ archivers/dump/ archivers/sevenz/ archivers/tar/ archivers/zip/ compressors/bzip2/ compres...

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/ArchiveUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/ArchiveUtils.java?rev=1695419&r1=1695418&r2=1695419&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/ArchiveUtils.java (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/ArchiveUtils.java Wed Aug 12 03:24:07 2015
@@ -40,6 +40,7 @@ public class ArchiveUtils {
      * d     100 testfiles
      * </pre>
      * 
+     * @param entry the entry
      * @return the representation of the entry
      */
     public static String toString(ArchiveEntry entry){
@@ -59,10 +60,10 @@ public class ArchiveUtils {
     /**
      * Check if buffer contents matches Ascii String.
      * 
-     * @param expected
-     * @param buffer
-     * @param offset
-     * @param length
+     * @param expected expected string
+     * @param buffer the buffer
+     * @param offset offset to read from
+     * @param length length of the buffer
      * @return {@code true} if buffer is the same as the expected string
      */
     public static boolean matchAsciiBuffer(
@@ -79,8 +80,8 @@ public class ArchiveUtils {
     /**
      * Check if buffer contents matches Ascii String.
      * 
-     * @param expected
-     * @param buffer
+     * @param expected the expected strin
+     * @param buffer the buffer
      * @return {@code true} if buffer is the same as the expected string
      */
     public static boolean matchAsciiBuffer(String expected, byte[] buffer){
@@ -91,7 +92,7 @@ public class ArchiveUtils {
      * Convert a string to Ascii bytes.
      * Used for comparing "magic" strings which need to be independent of the default Locale.
      * 
-     * @param inputString
+     * @param inputString string to convert
      * @return the bytes
      */
     public static byte[] toAsciiBytes(String inputString){
@@ -105,7 +106,7 @@ public class ArchiveUtils {
     /**
      * Convert an input byte array to a String using the ASCII character set.
      * 
-     * @param inputBytes
+     * @param inputBytes bytes to convert
      * @return the bytes, interpreted as an Ascii string
      */
     public static String toAsciiString(final byte[] inputBytes){
@@ -135,13 +136,13 @@ public class ArchiveUtils {
     /**
      * Compare byte buffers, optionally ignoring trailing nulls
      * 
-     * @param buffer1
-     * @param offset1
-     * @param length1
-     * @param buffer2
-     * @param offset2
-     * @param length2
-     * @param ignoreTrailingNulls
+     * @param buffer1 first buffer
+     * @param offset1 first offset
+     * @param length1 first length
+     * @param buffer2 second buffer
+     * @param offset2 second offset
+     * @param length2 second length
+     * @param ignoreTrailingNulls whether to ignore trailing nulls
      * @return {@code true} if buffer1 and buffer2 have same contents, having regard to trailing nulls
      */
     public static boolean isEqual(
@@ -179,12 +180,12 @@ public class ArchiveUtils {
     /**
      * Compare byte buffers
      * 
-     * @param buffer1
-     * @param offset1
-     * @param length1
-     * @param buffer2
-     * @param offset2
-     * @param length2
+     * @param buffer1 the first buffer
+     * @param offset1 the first offset
+     * @param length1 the first length
+     * @param buffer2 the second buffer
+     * @param offset2 the second offset
+     * @param length2 the second length
      * @return {@code true} if buffer1 and buffer2 have same contents
      */
     public static boolean isEqual(
@@ -196,8 +197,8 @@ public class ArchiveUtils {
     /**
      * Compare byte buffers
      * 
-     * @param buffer1
-     * @param buffer2
+     * @param buffer1 the first buffer
+     * @param buffer2 the second buffer
      * @return {@code true} if buffer1 and buffer2 have same contents
      */
     public static boolean isEqual(final byte[] buffer1, final byte[] buffer2 ){
@@ -207,9 +208,9 @@ public class ArchiveUtils {
     /**
      * Compare byte buffers, optionally ignoring trailing nulls
      * 
-     * @param buffer1
-     * @param buffer2
-     * @param ignoreTrailingNulls
+     * @param buffer1 the first buffer
+     * @param buffer2 the second buffer 
+     * @param ignoreTrailingNulls whether to ignore tariling nulls
      * @return {@code true} if buffer1 and buffer2 have same contents
      */
     public static boolean isEqual(final byte[] buffer1, final byte[] buffer2, boolean ignoreTrailingNulls){
@@ -219,12 +220,12 @@ public class ArchiveUtils {
     /**
      * Compare byte buffers, ignoring trailing nulls
      * 
-     * @param buffer1
-     * @param offset1
-     * @param length1
-     * @param buffer2
-     * @param offset2
-     * @param length2
+     * @param buffer1 the first buffer
+     * @param offset1 the first offset
+     * @param length1 the first length
+     * @param buffer2 the second buffer
+     * @param offset2 the second offset
+     * @param length2 the second length
      * @return {@code true} if buffer1 and buffer2 have same contents, having regard to trailing nulls
      */
     public static boolean isEqualWithNull(

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/BitInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/BitInputStream.java?rev=1695419&r1=1695418&r2=1695419&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/BitInputStream.java (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/BitInputStream.java Wed Aug 12 03:24:07 2015
@@ -75,6 +75,7 @@ public class BitInputStream implements C
      * @return the bits concatenated as a long using the stream's byte order.
      *         -1 if the end of the underlying stream has been reached before reading
      *         the requested number of bits
+     * @throws IOException on error
      */
     public long readBits(final int count) throws IOException {
         if (count < 0 || count > MAXIMUM_CACHE_SIZE) {

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/CRC32VerifyingInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/CRC32VerifyingInputStream.java?rev=1695419&r1=1695418&r2=1695419&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/CRC32VerifyingInputStream.java (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/CRC32VerifyingInputStream.java Wed Aug 12 03:24:07 2015
@@ -28,12 +28,20 @@ import java.util.zip.CRC32;
  */
 public class CRC32VerifyingInputStream extends ChecksumVerifyingInputStream {
     
+    /**
+     * @param in the stream to wrap
+     * @param size the of the stream's content
+     * @param expectedCrc32 the expected checksum
+     */
     public CRC32VerifyingInputStream(final InputStream in, final long size, final int expectedCrc32) {
         this(in, size, expectedCrc32 & 0xFFFFffffl);
     }
 
     /**
      * @since 1.7
+     * @param in the stream to wrap
+     * @param size the of the stream's content
+     * @param expectedCrc32 the expected checksum
      */
     public CRC32VerifyingInputStream(final InputStream in, final long size, final long expectedCrc32) {
         super(new CRC32(), in, size, expectedCrc32);

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/IOUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/IOUtils.java?rev=1695419&r1=1695418&r2=1695419&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/IOUtils.java (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/IOUtils.java Wed Aug 12 03:24:07 2015
@@ -49,6 +49,7 @@ public final class IOUtils {
      *            the InputStream to copy
      * @param output
      *            the target Stream
+     * @return the number of bytes copied
      * @throws IOException
      *             if an error occurs
      */
@@ -65,6 +66,7 @@ public final class IOUtils {
      *            the target Stream
      * @param buffersize
      *            the buffer size to use
+     * @return the number of bytes copied
      * @throws IOException
      *             if an error occurs
      */
@@ -93,7 +95,7 @@ public final class IOUtils {
      * @param input stream to skip bytes in
      * @param numToSkip the number of bytes to skip
      * @return the number of bytes actually skipped
-     * @throws IOException
+     * @throws IOException on error
      */
     public static long skip(InputStream input, long numToSkip) throws IOException {
         long available = numToSkip;
@@ -126,7 +128,7 @@ public final class IOUtils {
      * @param input stream to read from
      * @param b buffer to fill
      * @return the number of bytes actually read
-     * @throws IOException
+     * @throws IOException on error
      */
     public static int readFully(InputStream input, byte[] b) throws IOException {
         return readFully(input, b, 0, b.length);