http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java index 63db4cb..df78eae 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java @@ -27,7 +27,7 @@ import org.apache.commons.compress.archivers.ArchiveEntry; /** * An entry in a 7z archive. - * + * * @NotThreadSafe * @since 1.6 */ @@ -48,7 +48,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { private long crc, compressedCrc; private long size, compressedSize; private Iterable<? extends SevenZMethodConfiguration> contentMethods; - + public SevenZArchiveEntry() { } @@ -61,7 +61,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { public String getName() { return name; } - + /** * Set this entry's name. * @@ -96,7 +96,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { public boolean isDirectory() { return isDirectory; } - + /** * Sets whether or not this entry represents a directory. * @@ -105,10 +105,10 @@ public class SevenZArchiveEntry implements ArchiveEntry { public void setDirectory(final boolean isDirectory) { this.isDirectory = isDirectory; } - + /** * Indicates whether this is an "anti-item" used in differential backups, - * meaning it should delete the same file from a previous backup. + * meaning it should delete the same file from a previous backup. * @return true if it is an anti-item, false otherwise */ public boolean isAntiItem() { @@ -118,7 +118,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { /** * Sets whether this is an "anti-item" used in differential backups, * meaning it should delete the same file from a previous backup. - * @param isAntiItem true if it is an anti-item, false otherwise + * @param isAntiItem true if it is an anti-item, false otherwise */ public void setAntiItem(final boolean isAntiItem) { this.isAntiItem = isAntiItem; @@ -131,7 +131,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { public boolean getHasCreationDate() { return hasCreationDate; } - + /** * Sets whether this entry has got a creation date at all. * @param hasCreationDate whether the entry has got a creation date @@ -139,7 +139,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { public void setHasCreationDate(final boolean hasCreationDate) { this.hasCreationDate = hasCreationDate; } - + /** * Gets the creation date. * @throws UnsupportedOperationException if the entry hasn't got a @@ -153,7 +153,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { throw new UnsupportedOperationException( "The entry doesn't have this timestamp"); } - + /** * Sets the creation date using NTFS time (100 nanosecond units * since 1 January 1601) @@ -162,7 +162,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { public void setCreationDate(final long ntfsCreationDate) { this.creationDate = ntfsCreationDate; } - + /** * Sets the creation date, * @param creationDate the creation date @@ -205,7 +205,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { throw new UnsupportedOperationException( "The entry doesn't have this timestamp"); } - + /** * Sets the last modified date using NTFS time (100 nanosecond * units since 1 January 1601) @@ -214,7 +214,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { public void setLastModifiedDate(final long ntfsLastModifiedDate) { this.lastModifiedDate = ntfsLastModifiedDate; } - + /** * Sets the last modified date, * @param lastModifiedDate the last modified date @@ -225,7 +225,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { this.lastModifiedDate = javaTimeToNtfsTime(lastModifiedDate); } } - + /** * Returns whether this entry has got an access date at all. * @return whether this entry has got an access date at all. @@ -255,7 +255,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { throw new UnsupportedOperationException( "The entry doesn't have this timestamp"); } - + /** * Sets the access date using NTFS time (100 nanosecond units * since 1 January 1601) @@ -264,7 +264,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { public void setAccessDate(final long ntfsAccessDate) { this.accessDate = ntfsAccessDate; } - + /** * Sets the access date, * @param accessDate the access date @@ -411,7 +411,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { public long getSize() { return size; } - + /** * Set this entry's file size. * @@ -429,7 +429,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { long getCompressedSize() { return compressedSize; } - + /** * Set this entry's compressed file size. * @@ -497,7 +497,7 @@ public class SevenZArchiveEntry implements ArchiveEntry { final long realTime = ntfsEpoch.getTimeInMillis() + (ntfsTime / (10*1000)); return new Date(realTime); } - + /** * Converts Java time to NTFS time. * @param date the Java time
http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java index e0de903..ecee9a9 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java @@ -66,7 +66,7 @@ import org.apache.commons.compress.utils.IOUtils; * encrypted, neither file names nor file * contents can be read, but the use of * encryption isn't plausibly deniable. - * + * * @NotThreadSafe * @since 1.6 */ @@ -672,7 +672,7 @@ public class SevenZFile implements Closeable { files[i] = new SevenZArchiveEntry(); } BitSet isEmptyStream = null; - BitSet isEmptyFile = null; + BitSet isEmptyFile = null; BitSet isAnti = null; while (true) { final int propertyType = getUnsignedByte(header); @@ -839,7 +839,7 @@ public class SevenZFile implements Closeable { streamMap.packStreamOffsets = new long[numPackSizes]; for (int i = 0; i < numPackSizes; i++) { streamMap.packStreamOffsets[i] = nextPackStreamOffset; - nextPackStreamOffset += archive.packSizes[i]; + nextPackStreamOffset += archive.packSizes[i]; } streamMap.folderFirstFileIndex = new int[numFolders]; @@ -945,7 +945,7 @@ public class SevenZFile implements Closeable { /** * Reads a byte of data. - * + * * @return the byte read, or -1 if end of input is reached * @throws IOException * if an I/O error has occurred @@ -976,7 +976,7 @@ public class SevenZFile implements Closeable { /** * Reads data into an array of bytes. - * + * * @param b the array to write data to * @return the number of bytes read, or -1 if end of input is reached * @throws IOException @@ -988,7 +988,7 @@ public class SevenZFile implements Closeable { /** * Reads data into an array of bytes. - * + * * @param b the array to write data to * @param off offset into the buffer to start filling at * @param len of bytes to read http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java index dc0140d..2ed2175 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java @@ -125,7 +125,7 @@ public class SevenZOutputFile implements Closeable { /** * Closes the archive, calling {@link #finish} if necessary. - * + * * @throws IOException on error */ @Override @@ -138,11 +138,11 @@ public class SevenZOutputFile implements Closeable { /** * Create an archive entry using the inputFile and entryName provided. - * + * * @param inputFile file to create an entry from * @param entryName the name to use * @return the ArchiveEntry set up with details from the file - * + * * @throws IOException on error */ public SevenZArchiveEntry createArchiveEntry(final File inputFile, @@ -159,7 +159,7 @@ public class SevenZOutputFile implements Closeable { * * The caller must then write the content to the archive and call * {@link #closeArchiveEntry()} to complete the process. - * + * * @param archiveEntry describes the entry * @throws IOException on error */ @@ -240,7 +240,7 @@ public class SevenZOutputFile implements Closeable { /** * Finishes the addition of entries to this archive, without closing it. - * + * * @throws IOException if archive is already closed. */ public void finish() throws IOException { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java index 4f090ec..71c943d 100644 --- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java @@ -127,7 +127,7 @@ public class TarArchiveInputStream extends ArchiveInputStream { * @param recordSize the record size to use */ public TarArchiveInputStream(final InputStream is, final int blockSize, final int recordSize) { - this(is, blockSize, recordSize, null); + this(is, blockSize, recordSize, null); } /** @@ -189,7 +189,7 @@ public class TarArchiveInputStream extends ArchiveInputStream { return (int) (entrySize - entryOffset); } - + /** * Skips over and discards <code>n</code> bytes of data from this input * stream. The <code>skip</code> method may, for a variety of reasons, end @@ -198,8 +198,8 @@ public class TarArchiveInputStream extends ArchiveInputStream { * or end of entry before <code>n</code> bytes have been skipped; are only * two possibilities. The actual number of bytes skipped is returned. If * <code>n</code> is negative, no bytes are skipped. - * - * + * + * * @param n * the number of bytes to be skipped. * @return the actual number of bytes skipped. @@ -213,7 +213,7 @@ public class TarArchiveInputStream extends ArchiveInputStream { } final long available = entrySize - entryOffset; - final long skipped = is.skip(Math.min(n, available)); + final long skipped = is.skip(Math.min(n, available)); count(skipped); entryOffset += skipped; return skipped; @@ -332,7 +332,7 @@ public class TarArchiveInputStream extends ArchiveInputStream { return currEntry; } - + /** * The last record block should be written at the full size, so skip any * additional space used to fill a record after an entry @@ -414,7 +414,7 @@ public class TarArchiveInputStream extends ArchiveInputStream { protected boolean isEOFRecord(final byte[] record) { return record == null || ArchiveUtils.isArrayZero(record, recordSize); } - + /** * Read a record from the input stream and return the data. * @@ -551,7 +551,7 @@ public class TarArchiveInputStream extends ArchiveInputStream { public ArchiveEntry getNextEntry() throws IOException { return getNextTarEntry(); } - + /** * Tries to read the next record rewinding the stream if it is not a EOF record. * @@ -604,9 +604,9 @@ public class TarArchiveInputStream extends ArchiveInputStream { } numToRead = Math.min(numToRead, available()); - + totalRead = is.read(buf, offset, numToRead); - + if (totalRead == -1) { if (numToRead > 0) { throw new IOException("Truncated TAR archive"); @@ -636,7 +636,7 @@ public class TarArchiveInputStream extends ArchiveInputStream { /** * Get the current TAR Archive Entry that this input stream is processing - * + * * @return The current Archive Entry */ public TarArchiveEntry getCurrentEntry() { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/tar/TarConstants.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarConstants.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarConstants.java index 9dde016..751840d 100644 --- a/src/main/java/org/apache/commons/compress/archivers/tar/TarConstants.java +++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarConstants.java @@ -73,7 +73,7 @@ public interface TarConstants { * be expressed in octal char notation (that's 7 sevens, octal). */ long MAXID = 07777777L; - + /** * The length of the checksum field in a header buffer. */ @@ -92,7 +92,7 @@ public interface TarConstants { int SIZELEN = 12; /** - * The maximum size of a file in a tar archive + * The maximum size of a file in a tar archive * which can be expressed in octal char notation (that's 11 sevens, octal). */ long MAXSIZE = 077777777777L; @@ -133,67 +133,67 @@ public interface TarConstants { /** * Length of the prefix field. - * + * */ int PREFIXLEN = 155; /** * The length of the access time field in an old GNU header buffer. - * + * */ int ATIMELEN_GNU = 12; /** * The length of the created time field in an old GNU header buffer. - * + * */ int CTIMELEN_GNU = 12; /** - * The length of the multivolume start offset field in an old GNU header buffer. - * + * The length of the multivolume start offset field in an old GNU header buffer. + * */ int OFFSETLEN_GNU = 12; /** - * The length of the long names field in an old GNU header buffer. - * + * The length of the long names field in an old GNU header buffer. + * */ int LONGNAMESLEN_GNU = 4; /** - * The length of the padding field in an old GNU header buffer. - * + * The length of the padding field in an old GNU header buffer. + * */ int PAD2LEN_GNU = 1; /** - * The sum of the length of all sparse headers in an old GNU header buffer. - * + * The sum of the length of all sparse headers in an old GNU header buffer. + * */ int SPARSELEN_GNU = 96; /** - * The length of the is extension field in an old GNU header buffer. - * + * The length of the is extension field in an old GNU header buffer. + * */ int ISEXTENDEDLEN_GNU = 1; /** - * The length of the real size field in an old GNU header buffer. - * + * The length of the real size field in an old GNU header buffer. + * */ int REALSIZELEN_GNU = 12; /** - * The sum of the length of all sparse headers in a sparse header buffer. - * + * The sum of the length of all sparse headers in a sparse header buffer. + * */ int SPARSELEN_GNU_SPARSE = 504; /** - * The length of the is extension field in a sparse header buffer. - * + * The length of the is extension field in a sparse header buffer. + * */ int ISEXTENDEDLEN_GNU_SPARSE = 1; @@ -337,21 +337,21 @@ public interface TarConstants { /** * Length of the prefix field in xstar archives. - * + * * @since 1.11 */ int PREFIXLEN_XSTAR = 131; /** * The length of the access time field in a xstar header buffer. - * + * * @since 1.11 */ int ATIMELEN_XSTAR = 12; /** * The length of the created time field in a xstar header buffer. - * + * * @since 1.11 */ int CTIMELEN_XSTAR = 12; http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java index ec5b767..9448cdc 100644 --- a/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java +++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java @@ -147,7 +147,7 @@ public class TarUtils { return result; } - /** + /** * Compute the value contained in a byte buffer. If the most * significant bit of the first byte in the buffer is set, this * bit is ignored and the rest of the buffer is interpreted as a @@ -303,7 +303,7 @@ public class TarUtils { /** * Copy a name into a buffer. * Copies characters from the name into the buffer - * starting at the specified offset. + * starting at the specified offset. * If the buffer is longer than the name, the buffer * is filled with trailing NULs. * If the name is longer than the buffer, @@ -332,7 +332,7 @@ public class TarUtils { /** * Copy a name into a buffer. * Copies characters from the name into the buffer - * starting at the specified offset. + * starting at the specified offset. * If the buffer is longer than the name, the buffer * is filled with trailing NULs. * If the name is longer than the buffer, @@ -369,7 +369,7 @@ public class TarUtils { /** * Fill buffer with unsigned octal number, padded with leading zeroes. - * + * * @param value number to convert to octal - treated as unsigned * @param buffer destination buffer * @param offset starting offset in buffer @@ -407,7 +407,7 @@ public class TarUtils { * Uses {@link #formatUnsignedOctalString} to format * the value as an octal string with leading zeros. * The converted number is followed by space and NUL - * + * * @param value The value to write * @param buf The buffer to receive the output * @param offset The starting offset into the buffer @@ -428,11 +428,11 @@ public class TarUtils { /** * Write an octal long integer into a buffer. - * + * * Uses {@link #formatUnsignedOctalString} to format * the value as an octal string with leading zeros. * The converted number is followed by a space. - * + * * @param value The value to write as octal * @param buf The destinationbuffer. * @param offset The starting offset into the buffer. @@ -453,11 +453,11 @@ public class TarUtils { /** * Write an long integer into a buffer as an octal string if this * will fit, or as a binary number otherwise. - * + * * Uses {@link #formatUnsignedOctalString} to format * the value as an octal string with leading zeros. * The converted number is followed by a space. - * + * * @param value The value to write into the buffer. * @param buf The destination buffer. * @param offset The starting offset into the buffer. @@ -530,7 +530,7 @@ public class TarUtils { /** * Writes an octal value into a buffer. - * + * * Uses {@link #formatUnsignedOctalString} to format * the value as an octal string with leading zeros. * The converted number is followed by NUL and then space. http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java b/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java index aa05a99..846c9e1 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java @@ -39,7 +39,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField { /** * Assemble as unicode extension from the name/comment and * encoding of the original zip entry. - * + * * @param text The file name or comment. * @param bytes The encoded of the filename or comment in the zip * file. @@ -63,7 +63,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField { /** * Assemble as unicode extension from the name/comment and * encoding of the original zip entry. - * + * * @param text The file name or comment. * @param bytes The encoded of the filename or comment in the zip * file. http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/BinaryTree.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/BinaryTree.java b/src/main/java/org/apache/commons/compress/archivers/zip/BinaryTree.java index c73e3d5..9b3c377 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/BinaryTree.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/BinaryTree.java @@ -26,7 +26,7 @@ import java.util.Arrays; /** * Binary tree of positive values. - * + * * @author Emmanuel Bourg * @since 1.7 */ @@ -34,11 +34,11 @@ class BinaryTree { /** Value in the array indicating an undefined node */ private static final int UNDEFINED = -1; - + /** Value in the array indicating a non leaf node */ private static final int NODE = -2; - /** + /** * The array representing the binary tree. The root is at index 0, * the left children are at 2*i+1 and the right children at 2*i+2. */ @@ -51,7 +51,7 @@ class BinaryTree { /** * Adds a leaf to the tree. - * + * * @param node the index of the node where the path is appended * @param path the path to the leaf (bits are parsed from the right to the left) * @param depth the number of nodes in the path @@ -68,7 +68,7 @@ class BinaryTree { } else { // mark the current node as a non leaf node tree[node] = NODE; - + // move down the path recursively final int nextChild = 2 * node + 1 + (path & 1); addLeaf(nextChild, path >>> 1, depth - 1, value); @@ -77,7 +77,7 @@ class BinaryTree { /** * Reads a value from the specified bit stream. - * + * * @param stream * @return the value decoded, or -1 if the end of the stream is reached */ @@ -102,7 +102,7 @@ class BinaryTree { } } } - + /** * Decodes the packed binary tree from the specified stream. @@ -119,7 +119,7 @@ class BinaryTree { /** The maximum bit length for a value (16 or lower) */ int maxLength = 0; - + final int[] originalBitLengths = new int[totalNumberOfValues]; int pos = 0; for (final byte b : encodedTree) { @@ -130,7 +130,7 @@ class BinaryTree { for (int j = 0; j < numberOfValues; j++) { originalBitLengths[pos++] = bitLength; } - + maxLength = Math.max(maxLength, bitLength); } @@ -139,7 +139,7 @@ class BinaryTree { for (int k = 0; k < permutation.length; k++) { permutation[k] = k; } - + int c = 0; final int[] sortedBitLengths = new int[originalBitLengths.length]; for (int k = 0; k < originalBitLengths.length; k++) { @@ -149,10 +149,10 @@ class BinaryTree { if (originalBitLengths[l] == k) { // put the value at the current position in the sorted array... sortedBitLengths[c] = k; - + // ...and memorize the permutation - permutation[c] = l; - + permutation[c] = l; + c++; } } @@ -173,10 +173,10 @@ class BinaryTree { } codes[permutation[i]] = code; } - + // build the tree final BinaryTree tree = new BinaryTree(maxLength); - + for (int k = 0; k < codes.length; k++) { final int bitLength = originalBitLengths[k]; if (bitLength > 0) { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/BitStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/BitStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/BitStream.java index 98e80fe..fb737b7 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/BitStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/BitStream.java @@ -38,7 +38,7 @@ class BitStream extends BitInputStream { /** * Returns the next bit. - * + * * @return The next bit (0 or 1) or -1 if the end of the stream has been reached */ int nextBit() throws IOException { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/CircularBuffer.java ---------------------------------------------------------------------- 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 69b980f..8502e46 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 @@ -21,7 +21,7 @@ package org.apache.commons.compress.archivers.zip; /** * Circular byte buffer. - * + * * @author Emmanuel Bourg * @since 1.7 */ @@ -29,7 +29,7 @@ class CircularBuffer { /** Size of the buffer */ private final int size; - + /** The buffer */ private final byte[] buffer; @@ -73,7 +73,7 @@ class CircularBuffer { /** * Copy 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 */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java index 01dd4e2..b3be60b 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java @@ -28,9 +28,9 @@ import java.io.InputStream; * method. * <p> * The algorithm is described in the ZIP File Format Specification. - * + * * @see <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">ZIP File Format Specification</a> - * + * * @author Emmanuel Bourg * @since 1.7 */ @@ -38,7 +38,7 @@ class ExplodingInputStream extends InputStream { /** The underlying stream containing the compressed data */ private final InputStream in; - + /** The stream of bits read from the input stream */ private BitStream bits; @@ -85,7 +85,7 @@ class ExplodingInputStream extends InputStream { /** * Reads the encoded binary trees and prepares the bit stream. - * + * * @throws IOException */ private void init() throws IOException { @@ -96,7 +96,7 @@ class ExplodingInputStream extends InputStream { lengthTree = BinaryTree.decode(in, 64); distanceTree = BinaryTree.decode(in, 64); - + bits = new BitStream(in); } } @@ -116,7 +116,7 @@ class ExplodingInputStream extends InputStream { */ private void fillBuffer() throws IOException { init(); - + final int bit = bits.nextBit(); if (bit == 1) { // literal value @@ -131,7 +131,7 @@ class ExplodingInputStream extends InputStream { // end of stream reached, nothing left to decode return; } - + buffer.put(literal); } else if (bit == 0) { @@ -144,7 +144,7 @@ class ExplodingInputStream extends InputStream { return; } final int distance = distanceHigh << distanceLowSize | distanceLow; - + int length = lengthTree.read(bits); if (length == 63) { length += bits.nextBits(8); http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java b/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java index 63ba415..dd363aa 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java @@ -20,7 +20,7 @@ package org.apache.commons.compress.archivers.zip; /** * Parser/encoder for the "general purpose bit" field in ZIP's local * file and central directory headers. - * + * * @since 1.1 * @NotThreadSafe */ @@ -196,7 +196,7 @@ public final class GeneralPurposeBit implements Cloneable { /** * Parses the supported flags from the given archive data. - * + * * @param data local file header or a central directory entry. * @param offset offset at which the general purpose bit starts * @return parsed flags http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/PKWareExtraHeader.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/PKWareExtraHeader.java b/src/main/java/org/apache/commons/compress/archivers/zip/PKWareExtraHeader.java index 5436ccf..8540632 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/PKWareExtraHeader.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/PKWareExtraHeader.java @@ -80,7 +80,7 @@ public abstract class PKWareExtraHeader implements ZipExtraField { protected PKWareExtraHeader(final ZipShort headerId) { this.headerId = headerId; } - + /** * Get the header id. * @@ -193,7 +193,7 @@ public abstract class PKWareExtraHeader implements ZipExtraField { setLocalFileDataData(tmp); } } - + /** * Encryption algorithm. * http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/UnicodeCommentExtraField.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/UnicodeCommentExtraField.java b/src/main/java/org/apache/commons/compress/archivers/zip/UnicodeCommentExtraField.java index b961114..0b5ba41 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/UnicodeCommentExtraField.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/UnicodeCommentExtraField.java @@ -33,13 +33,13 @@ public class UnicodeCommentExtraField extends AbstractUnicodeExtraField { public static final ZipShort UCOM_ID = new ZipShort(0x6375); - public UnicodeCommentExtraField () { + public UnicodeCommentExtraField () { } /** * Assemble as unicode comment extension from the name given as * text as well as the encoded bytes actually written to the archive. - * + * * @param text The file name * @param bytes the bytes actually written to the archive * @param off The offset of the encoded comment in <code>bytes</code>. @@ -54,7 +54,7 @@ public class UnicodeCommentExtraField extends AbstractUnicodeExtraField { /** * Assemble as unicode comment extension from the comment given as * text as well as the bytes actually written to the archive. - * + * * @param comment The file comment * @param bytes the bytes actually written to the archive */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/UnicodePathExtraField.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/UnicodePathExtraField.java b/src/main/java/org/apache/commons/compress/archivers/zip/UnicodePathExtraField.java index f1cf6c1..5c63eea 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/UnicodePathExtraField.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/UnicodePathExtraField.java @@ -21,7 +21,7 @@ package org.apache.commons.compress.archivers.zip; /** * Info-ZIP Unicode Path Extra Field (0x7075): * - * <p>Stores the UTF-8 version of the file name field as stored in the + * <p>Stores the UTF-8 version of the file name field as stored in the * local header and central directory header.</p> * * @see <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">PKWARE @@ -33,13 +33,13 @@ public class UnicodePathExtraField extends AbstractUnicodeExtraField { public static final ZipShort UPATH_ID = new ZipShort(0x7075); - public UnicodePathExtraField () { + public UnicodePathExtraField () { } /** * Assemble as unicode path extension from the name given as * text as well as the encoded bytes actually written to the archive. - * + * * @param text The file name * @param bytes the bytes actually written to the archive * @param off The offset of the encoded filename in <code>bytes</code>. @@ -53,7 +53,7 @@ public class UnicodePathExtraField extends AbstractUnicodeExtraField { /** * Assemble as unicode path extension from the name given as * text as well as the encoded bytes actually written to the archive. - * + * * @param name The file name * @param bytes the bytes actually written to the archive */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/UnshrinkingInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/UnshrinkingInputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/UnshrinkingInputStream.java index d33db30..11c904c 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/UnshrinkingInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/UnshrinkingInputStream.java @@ -33,10 +33,10 @@ class UnshrinkingInputStream extends LZWInputStream { private static final int MAX_CODE_SIZE = 13; private static final int MAX_TABLE_SIZE = 1 << MAX_CODE_SIZE; private final boolean[] isUsed; - + /** * IOException is not actually thrown! - * + * * @param inputStream * @throws IOException IOException is not actually thrown! */ @@ -64,7 +64,7 @@ class UnshrinkingInputStream extends LZWInputStream { } return idx; } - + private void partialClear() { final boolean[] isParent = new boolean[MAX_TABLE_SIZE]; for (int i = 0; i < isUsed.length; i++) { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java index ba88a2f..d744a04 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java @@ -176,7 +176,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry * @param entryName name of the entry */ public ZipArchiveEntry(final File inputFile, final String entryName) { - this(inputFile.isDirectory() && !entryName.endsWith("/") ? + this(inputFile.isDirectory() && !entryName.endsWith("/") ? entryName + "/" : entryName); if (inputFile.isFile()){ setSize(inputFile.length()); http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java index eef8990..54b69ae 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java @@ -358,7 +358,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream { */ private void processZip64Extra(final ZipLong size, final ZipLong cSize) { final Zip64ExtendedInformationExtraField z64 = - (Zip64ExtendedInformationExtraField) + (Zip64ExtendedInformationExtraField) current.entry.getExtraField(Zip64ExtendedInformationExtraField.HEADER_ID); current.usesZip64 = z64 != null; if (!current.hasDataDescriptor) { @@ -410,7 +410,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream { if (offset > buffer.length || length < 0 || offset < 0 || buffer.length - offset < length) { throw new ArrayIndexOutOfBoundsException(); } - + ZipUtil.checkRequestedFeatures(current.entry); if (!supportsDataDescriptorFor(current.entry)) { throw new UnsupportedZipFeatureException(UnsupportedZipFeatureException.Feature.DATA_DESCRIPTOR, @@ -430,11 +430,11 @@ public class ZipArchiveInputStream extends ArchiveInputStream { throw new UnsupportedZipFeatureException(ZipMethod.getMethodByCode(current.entry.getMethod()), current.entry); } - + if (read >= 0) { current.crc.update(buffer, offset, read); } - + return read; } @@ -1069,7 +1069,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream { /** the number of bytes already returned */ private long pos = 0; - + /** * Creates a new <code>BoundedInputStream</code> that wraps the given input * stream and limits it to a certain size. @@ -1124,7 +1124,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream { pos += skippedBytes; return skippedBytes; } - + @Override public int available() throws IOException { if (max >= 0 && pos >= max) { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java index cb594f2..52e1334 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java @@ -242,7 +242,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { * whether to use the general purpose bit flag when writing UTF-8 * filenames or not. */ - private boolean useUTF8Flag = true; + private boolean useUTF8Flag = true; /** * Whether to encode non-encodable file names as UTF-8. @@ -428,7 +428,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { * this mode is not valid when the output stream is not seekable * and the uncompressed size is unknown when {@link * #putArchiveEntry} is called.</p> - * + * * <p>If no entry inside the resulting archive requires Zip64 * extensions then {@link Zip64Mode#Never Never} will create the * smallest archive. {@link Zip64Mode#AsNeeded AsNeeded} will @@ -498,7 +498,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { * Writes all necessary data for this entry. * @throws IOException on error * @throws Zip64RequiredException if the entry's uncompressed or - * compressed size exceeds 4 GByte and {@link #setUseZip64} + * compressed size exceeds 4 GByte and {@link #setUseZip64} * is {@link Zip64Mode#Never}. */ @Override @@ -716,10 +716,10 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { } /** - * {@inheritDoc} + * {@inheritDoc} * @throws ClassCastException if entry is not an instance of ZipArchiveEntry * @throws Zip64RequiredException if the entry's uncompressed or - * compressed size is known to exceed 4 GByte and {@link #setUseZip64} + * compressed size is known to exceed 4 GByte and {@link #setUseZip64} * is {@link Zip64Mode#Never}. */ @Override http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncoding.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncoding.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncoding.java index d38b556..dacd063 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncoding.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncoding.java @@ -30,14 +30,14 @@ import java.nio.ByteBuffer; * {@link java.nio.charset.Charset Charset} and one implementation, * which copes with simple 8 bit charsets, because java-1.4 did not * support Cp437 in java.nio.</p> - * + * * <p>The main reason for defining an own encoding layer comes from * the problems with {@link java.lang.String#getBytes(String) * String.getBytes}, which encodes unknown characters as ASCII * quotation marks ('?'). Quotation marks are per definition an * invalid filename on some operating systems like Windows, which * leads to ignored ZIP entries.</p> - * + * * <p>All implementations should implement this interface in a * reentrant way.</p> */ @@ -45,7 +45,7 @@ public interface ZipEncoding { /** * Check, whether the given string may be losslessly encoded using this * encoding. - * + * * @param name A filename or ZIP comment. * @return Whether the given name may be encoded with out any losses. */ @@ -54,15 +54,15 @@ public interface ZipEncoding { /** * Encode a filename or a comment to a byte array suitable for * storing it to a serialized zip entry. - * + * * <p>Examples for CP 437 (in pseudo-notation, right hand side is * C-style notation):</p> * <pre> * encode("\u20AC_for_Dollar.txt") = "%U20AC_for_Dollar.txt" * encode("\u00D6lf\u00E4sser.txt") = "\231lf\204sser.txt" * </pre> - * - * @param name A filename or ZIP comment. + * + * @param name A filename or ZIP comment. * @return A byte buffer with a backing array containing the * encoded name. Unmappable characters or malformed * character sequences are mapped to a sequence of utf-16 http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java index 4b16b52..9b13cf3 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java @@ -988,7 +988,7 @@ public class ZipFile implements Closeable { /** * Skips the given number of bytes or throws an EOFException if * skipping failed. - */ + */ private void skipBytes(final int count) throws IOException { long currentPosition = archive.position(); long newPosition = currentPosition + count; http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/ZipMethod.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipMethod.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipMethod.java index f4fbe59..9aab7de 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipMethod.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipMethod.java @@ -23,17 +23,17 @@ import java.util.Map; import java.util.zip.ZipEntry; /** - * List of known compression methods - * + * List of known compression methods + * * Many of these methods are currently not supported by commons compress - * + * * @since 1.5 */ public enum ZipMethod { /** * Compression method 0 for uncompressed entries. - * + * * @see ZipEntry#STORED */ STORED(ZipEntry.STORED), @@ -41,7 +41,7 @@ public enum ZipMethod { /** * UnShrinking. * dynamic Lempel-Ziv-Welch-Algorithm - * + * * @see <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">Explanation of fields: compression * method: (2 bytes)</a> */ @@ -49,7 +49,7 @@ public enum ZipMethod { /** * Reduced with compression factor 1. - * + * * @see <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">Explanation of fields: compression * method: (2 bytes)</a> */ @@ -57,7 +57,7 @@ public enum ZipMethod { /** * Reduced with compression factor 2. - * + * * @see <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">Explanation of fields: compression * method: (2 bytes)</a> */ @@ -65,7 +65,7 @@ public enum ZipMethod { /** * Reduced with compression factor 3. - * + * * @see <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">Explanation of fields: compression * method: (2 bytes)</a> */ @@ -73,7 +73,7 @@ public enum ZipMethod { /** * Reduced with compression factor 4. - * + * * @see <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">Explanation of fields: compression * method: (2 bytes)</a> */ @@ -81,7 +81,7 @@ public enum ZipMethod { /** * Imploding. - * + * * @see <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">Explanation of fields: compression * method: (2 bytes)</a> */ @@ -89,7 +89,7 @@ public enum ZipMethod { /** * Tokenization. - * + * * @see <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">Explanation of fields: compression * method: (2 bytes)</a> */ @@ -97,35 +97,35 @@ public enum ZipMethod { /** * Compression method 8 for compressed (deflated) entries. - * + * * @see ZipEntry#DEFLATED */ DEFLATED(ZipEntry.DEFLATED), /** * Compression Method 9 for enhanced deflate. - * + * * @see <a href="http://www.winzip.com/wz54.htm">http://www.winzip.com/wz54.htm</a> */ ENHANCED_DEFLATED(9), /** * PKWARE Data Compression Library Imploding. - * + * * @see <a href="http://www.winzip.com/wz54.htm">http://www.winzip.com/wz54.htm</a> */ PKWARE_IMPLODING(10), /** * Compression Method 12 for bzip2. - * + * * @see <a href="http://www.winzip.com/wz54.htm">http://www.winzip.com/wz54.htm</a> */ BZIP2(12), /** * Compression Method 14 for LZMA. - * + * * @see <a href="http://www.7-zip.org/sdk.html">http://www.7-zip.org/sdk.html</a> * @see <a href="http://www.winzip.com/wz54.htm">http://www.winzip.com/wz54.htm</a> */ @@ -134,21 +134,21 @@ public enum ZipMethod { /** * Compression Method 96 for Jpeg compression. - * + * * @see <a href="http://www.winzip.com/wz54.htm">http://www.winzip.com/wz54.htm</a> */ JPEG(96), /** * Compression Method 97 for WavPack. - * + * * @see <a href="http://www.winzip.com/wz54.htm">http://www.winzip.com/wz54.htm</a> */ WAVPACK(97), /** * Compression Method 98 for PPMd. - * + * * @see <a href="http://www.winzip.com/wz54.htm">http://www.winzip.com/wz54.htm</a> */ PPMD(98), @@ -156,7 +156,7 @@ public enum ZipMethod { /** * Compression Method 99 for AES encryption. - * + * * @see <a href="http://www.winzip.com/wz54.htm">http://www.winzip.com/wz54.htm</a> */ AES_ENCRYPTED(99), @@ -193,9 +193,9 @@ public enum ZipMethod { /** * the code of the compression method. - * + * * @see ZipArchiveEntry#getMethod() - * + * * @return an integer code for the method */ public int getCode() { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/zip/ZipUtil.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipUtil.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipUtil.java index cc3660b..97fd341 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipUtil.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipUtil.java @@ -259,7 +259,7 @@ public abstract class ZipUtil { * <p>If the field is null or the CRCs don't match, return null * instead.</p> */ - private static + private static String getUnicodeStringIfOriginalMatches(final AbstractUnicodeExtraField f, final byte[] orig) { if (f != null) { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/changes/Change.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/changes/Change.java b/src/main/java/org/apache/commons/compress/changes/Change.java index 8db217c..fb901bd 100644 --- a/src/main/java/org/apache/commons/compress/changes/Change.java +++ b/src/main/java/org/apache/commons/compress/changes/Change.java @@ -24,7 +24,7 @@ import org.apache.commons.compress.archivers.ArchiveEntry; /** * Change holds meta information about a change. - * + * * @Immutable */ class Change { @@ -59,7 +59,7 @@ class Change { /** * Construct a change which adds an entry. - * + * * @param pEntry the entry details * @param pInput the InputStream for the entry data */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/changes/ChangeSet.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/changes/ChangeSet.java b/src/main/java/org/apache/commons/compress/changes/ChangeSet.java index 42e3d3f..c0f8c61 100644 --- a/src/main/java/org/apache/commons/compress/changes/ChangeSet.java +++ b/src/main/java/org/apache/commons/compress/changes/ChangeSet.java @@ -29,7 +29,7 @@ import org.apache.commons.compress.archivers.ArchiveEntry; * ChangeSet collects and performs changes to an archive. * Putting delete changes in this ChangeSet from multiple threads can * cause conflicts. - * + * * @NotThreadSafe */ public final class ChangeSet { @@ -37,8 +37,8 @@ public final class ChangeSet { private final Set<Change> changes = new LinkedHashSet<>(); /** - * Deletes the file with the filename from the archive. - * + * Deletes the file with the filename from the archive. + * * @param filename * the filename of the file to delete */ @@ -47,8 +47,8 @@ public final class ChangeSet { } /** - * Deletes the directory tree from the archive. - * + * Deletes the directory tree from the archive. + * * @param dirName * the name of the directory tree to delete */ @@ -58,7 +58,7 @@ public final class ChangeSet { /** * Adds a new archive entry to the archive. - * + * * @param pEntry * the entry to add * @param pInput @@ -72,7 +72,7 @@ public final class ChangeSet { * Adds a new archive entry to the archive. * If replace is set to true, this change will replace all other additions * done in this ChangeSet and all existing entries in the original stream. - * + * * @param pEntry * the entry to add * @param pInput @@ -86,7 +86,7 @@ public final class ChangeSet { /** * Adds an addition change. - * + * * @param pChange * the change which should result in an addition */ @@ -120,7 +120,7 @@ public final class ChangeSet { /** * Adds an delete change. - * + * * @param pChange * the change which should result in a deletion */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/changes/ChangeSetPerformer.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/changes/ChangeSetPerformer.java b/src/main/java/org/apache/commons/compress/changes/ChangeSetPerformer.java index b16b3eb..bec6b64 100644 --- a/src/main/java/org/apache/commons/compress/changes/ChangeSetPerformer.java +++ b/src/main/java/org/apache/commons/compress/changes/ChangeSetPerformer.java @@ -37,7 +37,7 @@ import org.apache.commons.compress.utils.IOUtils; * This class is thread safe and can be used multiple times. * It operates on a copy of the ChangeSet. If the ChangeSet changes, * a new Performer must be created. - * + * * @ThreadSafe * @Immutable */ @@ -55,10 +55,10 @@ public class ChangeSetPerformer { /** * Performs all changes collected in this ChangeSet on the input stream and * streams the result to the output stream. Perform may be called more than once. - * + * * This method finishes the stream, no other entries should be added * after that. - * + * * @param in * the InputStream to perform the changes on * @param out @@ -75,10 +75,10 @@ public class ChangeSetPerformer { /** * Performs all changes collected in this ChangeSet on the ZipFile and * streams the result to the output stream. Perform may be called more than once. - * + * * This method finishes the stream, no other entries should be added * after that. - * + * * @param in * the ZipFile to perform the changes on * @param out @@ -96,10 +96,10 @@ public class ChangeSetPerformer { /** * Performs all changes collected in this ChangeSet on the input entries and * streams the result to the output stream. - * + * * This method finishes the stream, no other entries should be added * after that. - * + * * @param entryIterator * the entries to perform the changes on * @param out @@ -163,8 +163,8 @@ public class ChangeSetPerformer { for (final Iterator<Change> it = workingSet.iterator(); it.hasNext();) { final Change change = it.next(); - if (change.type() == Change.TYPE_ADD && - !change.isReplaceMode() && + if (change.type() == Change.TYPE_ADD && + !change.isReplaceMode() && !results.hasBeenAdded(change.getEntry().getName())) { copyStream(change.getInput(), out, change.getEntry()); it.remove(); @@ -179,7 +179,7 @@ public class ChangeSetPerformer { * Checks if an ArchiveEntry is deleted later in the ChangeSet. This is * necessary if an file is added with this ChangeSet, but later became * deleted in the same set. - * + * * @param entry * the entry to check * @return true, if this entry has an deletion change later, false otherwise @@ -205,7 +205,7 @@ public class ChangeSetPerformer { /** * Copies the ArchiveEntry to the Output stream - * + * * @param in * the stream to read the data from * @param out http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java b/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java index 8f100b3..788dccf 100644 --- a/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java +++ b/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java @@ -38,7 +38,7 @@ public class ChangeSetResults { } /** - * Adds the name of a file to the result list which has been + * Adds the name of a file to the result list which has been * copied from the source stream to the target stream. * @param fileName the file name which has been added from the original stream */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/compressors/CompressorException.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/compressors/CompressorException.java b/src/main/java/org/apache/commons/compress/compressors/CompressorException.java index 7c1a356..9af3e69 100644 --- a/src/main/java/org/apache/commons/compress/compressors/CompressorException.java +++ b/src/main/java/org/apache/commons/compress/compressors/CompressorException.java @@ -29,7 +29,7 @@ public class CompressorException extends Exception { /** * Constructs a new exception with the specified detail message. The cause * is not initialized. - * + * * @param message * the detail message */ @@ -39,7 +39,7 @@ public class CompressorException extends Exception { /** * Constructs a new exception with the specified detail message and cause. - * + * * @param message * the detail message * @param cause http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java index 0b2be21..8f30860 100644 --- a/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java +++ b/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java @@ -26,7 +26,7 @@ public abstract class CompressorInputStream extends InputStream { /** * Increments the counter of already read bytes. * Doesn't increment if the EOF has been hit (read == -1) - * + * * @param read the number of bytes read * * @since 1.1 @@ -38,7 +38,7 @@ public abstract class CompressorInputStream extends InputStream { /** * Increments the counter of already read bytes. * Doesn't increment if the EOF has been hit (read == -1) - * + * * @param read the number of bytes read */ protected void count(final long read) { @@ -49,7 +49,7 @@ public abstract class CompressorInputStream extends InputStream { /** * Decrements the counter of already read bytes. - * + * * @param pushedBack the number of bytes pushed back. * @since 1.7 */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java index ab9d5fd..3a1f2dc 100644 --- a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java +++ b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java @@ -68,9 +68,9 @@ import org.apache.commons.compress.utils.Sets; * implementations you should extend CompressorStreamFactory and override the * appropriate methods (and call their implementation from super of course). * </p> - * + * * Example (Compressing a file): - * + * * <pre> * final OutputStream out = Files.newOutputStream(output.toPath()); * CompressorOutputStream cos = new CompressorStreamFactory() @@ -78,9 +78,9 @@ import org.apache.commons.compress.utils.Sets; * IOUtils.copy(Files.newInputStream(input.toPath()), cos); * cos.close(); * </pre> - * + * * Example (Decompressing a file): - * + * * <pre> * final InputStream is = Files.newInputStream(input.toPath()); * CompressorInputStream in = new CompressorStreamFactory().createCompressorInputStream(CompressorStreamFactory.BZIP2, @@ -88,7 +88,7 @@ import org.apache.commons.compress.utils.Sets; * IOUtils.copy(in, Files.newOutputStream(output.toPath())); * in.close(); * </pre> - * + * * @Immutable provided that the deprecated method setDecompressConcatenated is * not used. * @ThreadSafe even if the deprecated method setDecompressConcatenated is used @@ -102,15 +102,15 @@ public class CompressorStreamFactory implements CompressorStreamProvider { /** * Constant (value {@value}) used to identify the BROTLI compression * algorithm. - * + * * @since 1.14 */ public static final String BROTLI = "br"; - + /** * Constant (value {@value}) used to identify the BZIP2 compression * algorithm. - * + * * @since 1.1 */ public static final String BZIP2 = "bzip2"; @@ -118,7 +118,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider { /** * Constant (value {@value}) used to identify the GZIP compression * algorithm. - * + * * @since 1.1 */ public static final String GZIP = "gz"; @@ -126,21 +126,21 @@ public class CompressorStreamFactory implements CompressorStreamProvider { /** * Constant (value {@value}) used to identify the PACK200 compression * algorithm. - * + * * @since 1.3 */ public static final String PACK200 = "pack200"; /** * Constant (value {@value}) used to identify the XZ compression method. - * + * * @since 1.4 */ public static final String XZ = "xz"; /** * Constant (value {@value}) used to identify the LZMA compression method. - * + * * @since 1.6 */ public static final String LZMA = "lzma"; @@ -148,7 +148,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider { /** * Constant (value {@value}) used to identify the "framed" Snappy * compression method. - * + * * @since 1.7 */ public static final String SNAPPY_FRAMED = "snappy-framed"; @@ -156,7 +156,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider { /** * Constant (value {@value}) used to identify the "raw" Snappy compression * method. Not supported as an output stream type. - * + * * @since 1.7 */ public static final String SNAPPY_RAW = "snappy-raw"; @@ -164,14 +164,14 @@ public class CompressorStreamFactory implements CompressorStreamProvider { /** * Constant (value {@value}) used to identify the traditional Unix compress * method. Not supported as an output stream type. - * + * * @since 1.7 */ public static final String Z = "z"; /** * Constant (value {@value}) used to identify the Deflate compress method. - * + * * @since 1.9 */ public static final String DEFLATE = "deflate"; @@ -371,7 +371,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider { private SortedMap<String, CompressorStreamProvider> compressorInputStreamProviders; private SortedMap<String, CompressorStreamProvider> compressorOutputStreamProviders; - + /** * If true, decompress until the end of the input. If false, stop after the * first stream and leave the input position to point to the next byte after @@ -415,7 +415,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider { /** * Create an instance with the provided decompress Concatenated option. - * + * * @param decompressUntilEOF * if true, decompress until the end of the input; if false, stop * after the first stream and leave the input position to point @@ -503,7 +503,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider { * Create an compressor input stream from an input stream, autodetecting the * compressor type from the first few bytes of the stream. The InputStream * must support marks, like BufferedInputStream. - * + * * @param in * the input stream * @return the compressor input stream @@ -520,7 +520,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider { /** * Creates a compressor input stream from a compressor name and an input * stream. - * + * * @param name * of the compressor, i.e. {@value #GZIP}, {@value #BZIP2}, * {@value #XZ}, {@value #LZMA}, {@value #PACK200}, @@ -558,7 +558,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider { if (BZIP2.equalsIgnoreCase(name)) { return new BZip2CompressorInputStream(in, actualDecompressConcatenated); } - + if (BROTLI.equalsIgnoreCase(name)) { if (!BrotliUtils.isBrotliCompressionAvailable()) { throw new CompressorException("Brotli compression is not available."); @@ -622,14 +622,14 @@ public class CompressorStreamFactory implements CompressorStreamProvider { if (compressorStreamProvider != null) { return compressorStreamProvider.createCompressorInputStream(name, in, actualDecompressConcatenated); } - + throw new CompressorException("Compressor: " + name + " not found."); } /** * Creates an compressor output stream from an compressor name and an output * stream. - * + * * @param name * the compressor name, i.e. {@value #GZIP}, {@value #BZIP2}, * {@value #XZ}, {@value #PACK200}, {@value #SNAPPY_FRAMED}, @@ -760,5 +760,5 @@ public class CompressorStreamFactory implements CompressorStreamProvider { } this.decompressConcatenated = decompressConcatenated; } - + } http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/compressors/CompressorStreamProvider.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamProvider.java b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamProvider.java index 139847a..b0c8431 100644 --- a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamProvider.java +++ b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamProvider.java @@ -26,7 +26,7 @@ import java.util.Set; /** * Creates Compressor {@link CompressorInputStream}s and * {@link CompressorOutputStream}s. - * + * * @since 1.13 */ public interface CompressorStreamProvider { @@ -34,7 +34,7 @@ public interface CompressorStreamProvider { /** * Creates a compressor input stream from a compressor name and an input * stream. - * + * * @param name * of the compressor, i.e. * {@value org.apache.commons.compress.compressors.CompressorStreamFactory#GZIP}, @@ -66,7 +66,7 @@ public interface CompressorStreamProvider { /** * Creates a compressor output stream from an compressor name and an output * stream. - * + * * @param name * the compressor name, i.e. * {@value org.apache.commons.compress.compressors.CompressorStreamFactory#GZIP}, @@ -88,14 +88,14 @@ public interface CompressorStreamProvider { /** * Gets all the input stream compressor names for this provider - * + * * @return all the input compressor names for this provider */ Set<String> getInputStreamCompressorNames(); /** * Gets all the output stream compressor names for this provider - * + * * @return all the output compressor names for this provider */ Set<String> getOutputStreamCompressorNames(); http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStream.java index 6c4bc55..6dc9946 100644 --- a/src/main/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStream.java +++ b/src/main/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStream.java @@ -25,11 +25,11 @@ import org.apache.commons.compress.compressors.CompressorInputStream; /** * {@link CompressorInputStream} implementation to decode Brotli encoded stream. * Library relies on <a href="https://github.com/google/brotli">Google brotli</a> - * + * * @since 1.14 */ public class BrotliCompressorInputStream extends CompressorInputStream { - + private final org.brotli.dec.BrotliInputStream decIS; public BrotliCompressorInputStream(final InputStream in) throws IOException { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java index a613ad8..17937e8 100644 --- a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java +++ b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java @@ -35,7 +35,7 @@ import org.apache.commons.compress.utils.CloseShieldFilterInputStream; /** * An input stream that decompresses from the BZip2 format to be read as any other stream. - * + * * @NotThreadSafe */ public class BZip2CompressorInputStream extends CompressorInputStream implements @@ -101,7 +101,7 @@ public class BZip2CompressorInputStream extends CompressorInputStream implements * Constructs a new BZip2CompressorInputStream which decompresses bytes * read from the specified stream. This doesn't suppprt decompressing * concatenated .bz2 files. - * + * * @param in the InputStream from which this object should be created * @throws IOException * if the stream content is malformed or an I/O error occurs. @@ -147,7 +147,7 @@ public class BZip2CompressorInputStream extends CompressorInputStream implements /* * (non-Javadoc) - * + * * @see java.io.InputStream#read(byte[], int, int) */ @Override @@ -878,7 +878,7 @@ public class BZip2CompressorInputStream extends CompressorInputStream implements /** * Initializes the {@link #tt} array. - * + * * This method is called when the required length of the array is known. * I don't initialize it at construction time to avoid unneccessary * memory allocation when compressing small files. @@ -901,13 +901,13 @@ public class BZip2CompressorInputStream extends CompressorInputStream implements /** * Checks if the signature matches what is expected for a bzip2 file. - * + * * @param signature * the bytes to check * @param length * the number of bytes to check * @return true, if this stream is a bzip2 compressed stream, false otherwise - * + * * @since 1.1 */ public static boolean matches(final byte[] signature, final int length) { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java index a26fac8..ba2beb1 100644 --- a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java +++ b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java @@ -344,7 +344,7 @@ public class BZip2CompressorOutputStream extends CompressorOutputStream /** * Constructs a new {@code BZip2CompressorOutputStream} with a blocksize of 900k. * - * @param out + * @param out * the destination stream. * * @throws IOException @@ -516,7 +516,7 @@ public class BZip2CompressorOutputStream extends CompressorOutputStream /** * Writes magic bytes like BZ on the first position of the stream - * and bytes indiciating the file-format, which is + * and bytes indiciating the file-format, which is * huffmanised, followed by a digit indicating blockSize100k. * @throws IOException if the magic bytes could not been written */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java b/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java index 18c37cd..69819e3 100644 --- a/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java +++ b/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java @@ -36,7 +36,7 @@ import java.util.BitSet; * <pre> * CompressCommons * Commons Compress - * CompressCommons + * CompressCommons * essCommons Compr * mmons CompressCo * mons CompressCom @@ -251,7 +251,7 @@ class BlockSort { * bucket 'ra' with sort index 5. The fully sorted order then becomes. * * fmap = { 5, 3, 0, 4, 1, 2 } - * + * */ /** @@ -261,12 +261,12 @@ class BlockSort { * @param eclass points from the index of a character inside the * block to the first index in fmap that contains the * bucket of its suffix that is sorted in this step. - * @param lo lower boundary of the fmap-interval to be sorted - * @param hi upper boundary of the fmap-interval to be sorted + * @param lo lower boundary of the fmap-interval to be sorted + * @param hi upper boundary of the fmap-interval to be sorted */ - private void fallbackSimpleSort(final int[] fmap, - final int[] eclass, - final int lo, + private void fallbackSimpleSort(final int[] fmap, + final int[] eclass, + final int lo, final int hi) { if (lo == hi) { return; @@ -336,12 +336,12 @@ class BlockSort { * @param eclass points from the index of a character inside the * block to the first index in fmap that contains the * bucket of its suffix that is sorted in this step. - * @param loSt lower boundary of the fmap-interval to be sorted - * @param hiSt upper boundary of the fmap-interval to be sorted + * @param loSt lower boundary of the fmap-interval to be sorted + * @param hiSt upper boundary of the fmap-interval to be sorted */ - private void fallbackQSort3(final int[] fmap, - final int[] eclass, - final int loSt, + private void fallbackQSort3(final int[] fmap, + final int[] eclass, + final int loSt, final int hiSt) { int lo, unLo, ltLo, hi, unHi, gtHi, n; @@ -359,9 +359,9 @@ class BlockSort { } /* LBZ2: Random partitioning. Median of 3 sometimes fails to - avoid bad cases. Median of 9 seems to help but + avoid bad cases. Median of 9 seems to help but looks rather expensive. This too seems to work but - is cheaper. Guidance for the magic constants + is cheaper. Guidance for the magic constants 7621 and 32768 is taken from Sedgewick's algorithms book, chapter 35. */ @@ -369,7 +369,7 @@ class BlockSort { final long r3 = r % 3; long med; if (r3 == 0) { - med = eclass[fmap[lo]]; + med = eclass[fmap[lo]]; } else if (r3 == 1) { med = eclass[fmap[(lo + hi) >>> 1]]; } else { @@ -387,10 +387,10 @@ class BlockSort { break; } n = eclass[fmap[unLo]] - (int) med; - if (n == 0) { - fswap(fmap, unLo, ltLo); - ltLo++; unLo++; - continue; + if (n == 0) { + fswap(fmap, unLo, ltLo); + ltLo++; unLo++; + continue; } if (n > 0) { break; @@ -403,9 +403,9 @@ class BlockSort { } n = eclass[fmap[unHi]] - (int) med; if (n == 0) { - fswap(fmap, unHi, gtHi); - gtHi--; unHi--; - continue; + fswap(fmap, unHi, gtHi); + gtHi--; unHi--; + continue; } if (n < 0) { break; @@ -511,7 +511,7 @@ class BlockSort { --*/ /*-- LBZ2: set sentinel bits for block-end detection --*/ - for (i = 0; i < 32; i++) { + for (i = 0; i < 32; i++) { bhtab.set(nblock + 2 * i); bhtab.clear(nblock + 2 * i + 1); } http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/compressors/bzip2/Rand.java ---------------------------------------------------------------------- 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 5358b3a..bb6ef80 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 @@ -81,7 +81,7 @@ final class Rand { /** * Return the random number at a specific index. - * + * * @param i the index * @return the random number */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/compressors/deflate/DeflateCompressorInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/compressors/deflate/DeflateCompressorInputStream.java b/src/main/java/org/apache/commons/compress/compressors/deflate/DeflateCompressorInputStream.java index b10bd8a..5e726f8 100644 --- a/src/main/java/org/apache/commons/compress/compressors/deflate/DeflateCompressorInputStream.java +++ b/src/main/java/org/apache/commons/compress/compressors/deflate/DeflateCompressorInputStream.java @@ -35,7 +35,7 @@ public class DeflateCompressorInputStream extends CompressorInputStream { private static final int MAGIC_2b = 0x5e; private static final int MAGIC_2c = 0x9c; private static final int MAGIC_2d = 0xda; - + private final InputStream in; private final Inflater inflater; @@ -62,7 +62,7 @@ public class DeflateCompressorInputStream extends CompressorInputStream { inflater = new Inflater(!parameters.withZlibHeader()); in = new InflaterInputStream(inputStream, inflater); } - + /** {@inheritDoc} */ @Override public int read() throws IOException { @@ -100,18 +100,18 @@ public class DeflateCompressorInputStream extends CompressorInputStream { inflater.end(); } } - + /** * Checks if the signature matches what is expected for a zlib / deflated file * with the zlib header. - * + * * @param signature * the bytes to check * @param length * the number of bytes to check * @return true, if this stream is zlib / deflate compressed with a header * stream, false otherwise - * + * * @since 1.10 */ public static boolean matches(final byte[] signature, final int length) {