Remove trailing white spaces on all lines. Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/6b12eab8 Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/6b12eab8 Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/6b12eab8
Branch: refs/heads/master Commit: 6b12eab8ef3255eed66d2e382411e973883f608a Parents: a0aec90 Author: Gary Gregory <garydgreg...@gmail.com> Authored: Wed Nov 1 16:25:38 2017 -0600 Committer: Gary Gregory <garydgreg...@gmail.com> Committed: Wed Nov 1 16:25:38 2017 -0600 ---------------------------------------------------------------------- .../commons/compress/MemoryLimitException.java | 2 +- .../compress/archivers/ArchiveEntry.java | 8 +- .../compress/archivers/ArchiveException.java | 6 +- .../compress/archivers/ArchiveInputStream.java | 22 +- .../compress/archivers/ArchiveOutputStream.java | 16 +- .../archivers/ArchiveStreamFactory.java | 4 +- .../archivers/ArchiveStreamProvider.java | 10 +- .../StreamingNotSupportedException.java | 12 +- .../compress/archivers/ar/ArArchiveEntry.java | 12 +- .../archivers/ar/ArArchiveInputStream.java | 20 +- .../archivers/ar/ArArchiveOutputStream.java | 6 +- .../compress/archivers/arj/ArjArchiveEntry.java | 8 +- .../archivers/arj/ArjArchiveInputStream.java | 34 +- .../compress/archivers/arj/LocalFileHeader.java | 12 +- .../compress/archivers/arj/MainHeader.java | 4 +- .../archivers/cpio/CpioArchiveEntry.java | 182 ++-- .../archivers/cpio/CpioArchiveInputStream.java | 32 +- .../archivers/cpio/CpioArchiveOutputStream.java | 34 +- .../compress/archivers/cpio/CpioConstants.java | 8 +- .../compress/archivers/cpio/CpioUtil.java | 12 +- .../archivers/dump/DumpArchiveInputStream.java | 2 +- .../archivers/dump/TapeInputStream.java | 4 +- .../archivers/jar/JarArchiveInputStream.java | 8 +- .../archivers/jar/JarArchiveOutputStream.java | 4 +- .../archivers/sevenz/AES256SHA256Decoder.java | 8 +- .../compress/archivers/sevenz/Archive.java | 4 +- .../commons/compress/archivers/sevenz/CLI.java | 4 +- .../compress/archivers/sevenz/Coders.java | 8 +- .../compress/archivers/sevenz/Folder.java | 4 +- .../archivers/sevenz/SevenZArchiveEntry.java | 38 +- .../compress/archivers/sevenz/SevenZFile.java | 12 +- .../archivers/sevenz/SevenZOutputFile.java | 10 +- .../archivers/tar/TarArchiveInputStream.java | 22 +- .../compress/archivers/tar/TarConstants.java | 48 +- .../compress/archivers/tar/TarUtils.java | 20 +- .../zip/AbstractUnicodeExtraField.java | 4 +- .../compress/archivers/zip/BinaryTree.java | 30 +- .../compress/archivers/zip/BitStream.java | 2 +- .../compress/archivers/zip/CircularBuffer.java | 6 +- .../archivers/zip/ExplodingInputStream.java | 16 +- .../archivers/zip/GeneralPurposeBit.java | 4 +- .../archivers/zip/PKWareExtraHeader.java | 4 +- .../archivers/zip/UnicodeCommentExtraField.java | 6 +- .../archivers/zip/UnicodePathExtraField.java | 8 +- .../archivers/zip/UnshrinkingInputStream.java | 6 +- .../compress/archivers/zip/ZipArchiveEntry.java | 2 +- .../archivers/zip/ZipArchiveInputStream.java | 12 +- .../archivers/zip/ZipArchiveOutputStream.java | 10 +- .../compress/archivers/zip/ZipEncoding.java | 12 +- .../commons/compress/archivers/zip/ZipFile.java | 2 +- .../compress/archivers/zip/ZipMethod.java | 44 +- .../commons/compress/archivers/zip/ZipUtil.java | 2 +- .../apache/commons/compress/changes/Change.java | 4 +- .../commons/compress/changes/ChangeSet.java | 18 +- .../compress/changes/ChangeSetPerformer.java | 22 +- .../compress/changes/ChangeSetResults.java | 2 +- .../compressors/CompressorException.java | 4 +- .../compressors/CompressorInputStream.java | 6 +- .../compressors/CompressorStreamFactory.java | 48 +- .../compressors/CompressorStreamProvider.java | 10 +- .../brotli/BrotliCompressorInputStream.java | 4 +- .../bzip2/BZip2CompressorInputStream.java | 12 +- .../bzip2/BZip2CompressorOutputStream.java | 4 +- .../compress/compressors/bzip2/BlockSort.java | 46 +- .../compress/compressors/bzip2/Rand.java | 2 +- .../deflate/DeflateCompressorInputStream.java | 10 +- .../gzip/GzipCompressorOutputStream.java | 32 +- .../compressors/gzip/GzipParameters.java | 12 +- .../lzma/LZMACompressorInputStream.java | 4 +- .../compressors/lzw/LZWInputStream.java | 6 +- .../pack200/Pack200CompressorInputStream.java | 4 +- .../pack200/Pack200CompressorOutputStream.java | 2 +- .../FramedSnappyCompressorInputStream.java | 4 +- .../compressors/snappy/PureJavaCrc32C.java | 1030 +++++++++--------- .../snappy/SnappyCompressorInputStream.java | 14 +- .../compressors/z/ZCompressorInputStream.java | 12 +- .../commons/compress/utils/ArchiveUtils.java | 30 +- .../commons/compress/utils/BitInputStream.java | 4 +- .../compress/utils/BoundedInputStream.java | 4 +- .../utils/CRC32VerifyingInputStream.java | 2 +- .../commons/compress/utils/CharsetNames.java | 22 +- .../utils/ChecksumVerifyingInputStream.java | 2 +- .../compress/utils/CountingInputStream.java | 2 +- .../compress/utils/CountingOutputStream.java | 2 +- .../apache/commons/compress/utils/IOUtils.java | 6 +- .../commons/compress/utils/Iterators.java | 4 +- .../apache/commons/compress/utils/Lists.java | 4 +- .../compress/utils/ServiceLoaderIterator.java | 2 +- .../org/apache/commons/compress/utils/Sets.java | 2 +- .../commons/compress/ArchiveReadTest.java | 8 +- .../commons/compress/ArchiveUtilsTest.java | 2 +- .../commons/compress/ChainingTestCase.java | 2 +- .../compress/DetectArchiverTestCase.java | 4 +- .../apache/commons/compress/IOMethodsTest.java | 2 +- .../archivers/ArchiveStreamFactoryTest.java | 12 +- .../compress/archivers/LongPathTest.java | 6 +- .../compress/archivers/LongSymLinkTest.java | 6 +- .../compress/archivers/SevenZTestCase.java | 14 +- .../commons/compress/archivers/ZipTestCase.java | 24 +- .../archivers/sevenz/SevenZFileTest.java | 2 +- .../archivers/tar/TarArchiveEntryTest.java | 4 +- .../compress/archivers/tar/TarLister.java | 2 +- .../compress/archivers/tar/TarUtilsTest.java | 4 +- .../archivers/zip/AsiExtraFieldTest.java | 2 +- .../compress/archivers/zip/BinaryTreeTest.java | 6 +- .../compress/archivers/zip/BitStreamTest.java | 4 +- .../archivers/zip/CircularBufferTest.java | 14 +- .../archivers/zip/ExplodeSupportTest.java | 2 +- .../zip/ParallelScatterZipCreatorTest.java | 2 +- .../zip/ScatterZipOutputStreamTest.java | 2 +- .../archivers/zip/UTF8ZipFilesTest.java | 2 +- .../zip/X5455_ExtendedTimestampTest.java | 2 +- .../zip/ZipArchiveInputStreamTest.java | 10 +- .../compress/archivers/zip/ZipFileTest.java | 4 +- .../compress/changes/ChangeSetTestCase.java | 70 +- .../compress/compressors/DeflateTestCase.java | 8 +- .../compressors/DetectCompressorTestCase.java | 10 +- .../compress/compressors/GZipTestCase.java | 18 +- .../brotli/BrotliCompressorInputStreamTest.java | 8 +- .../compressors/bzip2/BlockSortTest.java | 8 +- .../commons/compress/utils/CharsetsTest.java | 6 +- .../commons/compress/utils/IOUtilsTest.java | 4 +- 122 files changed, 1241 insertions(+), 1241 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/MemoryLimitException.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/MemoryLimitException.java b/src/main/java/org/apache/commons/compress/MemoryLimitException.java index fe68c0b..d251fb3 100644 --- a/src/main/java/org/apache/commons/compress/MemoryLimitException.java +++ b/src/main/java/org/apache/commons/compress/MemoryLimitException.java @@ -31,7 +31,7 @@ import java.io.IOException; public class MemoryLimitException extends IOException { private static final long serialVersionUID = 1L; - + //long instead of int to account for overflow for corrupt files private final long memoryNeededInKb; private final int memoryLimitInKb; http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java index a6ffcb8..bf31f00 100644 --- a/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java +++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java @@ -27,14 +27,14 @@ public interface ArchiveEntry { /** * Gets the name of the entry in this archive. May refer to a file or directory or other item. - * + * * @return The name of this entry in the archive. */ String getName(); /** * Gets the uncompressed size of this entry. May be -1 (SIZE_UNKNOWN) if the size is unknown - * + * * @return the uncompressed size of this entry. */ long getSize(); @@ -44,14 +44,14 @@ public interface ArchiveEntry { /** * Returns true if this entry refers to a directory. - * + * * @return true if this entry refers to a directory. */ boolean isDirectory(); /** * Gets the last modified date of this entry. - * + * * @return the last modified date of this entry. * @since 1.1 */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java b/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java index 4732345..bb57785 100644 --- a/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java +++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java @@ -19,7 +19,7 @@ package org.apache.commons.compress.archivers; /** - * Archiver related Exception + * Archiver related Exception */ public class ArchiveException extends Exception { @@ -29,7 +29,7 @@ public class ArchiveException 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 ArchiveException 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/archivers/ArchiveInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java index f36b5a2..9c4e978 100644 --- a/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java @@ -22,7 +22,7 @@ import java.io.IOException; import java.io.InputStream; /** - * Archive input streams <b>MUST</b> override the + * Archive input streams <b>MUST</b> override the * {@link #read(byte[], int, int)} - or {@link #read()} - * method so that reading from the stream generates EOF for the end of * data in each entry as well as at the end of the file proper. @@ -35,7 +35,7 @@ import java.io.InputStream; * public static boolean matches(byte[] signature, int length) * </pre> * which is used by the {@link ArchiveStreamFactory} to autodetect - * the archive type from the first few bytes of a stream. + * the archive type from the first few bytes of a stream. */ public abstract class ArchiveInputStream extends InputStream { @@ -66,12 +66,12 @@ public abstract class ArchiveInputStream extends InputStream { /** * Reads a byte of data. This method will block until enough input is * available. - * + * * Simply calls the {@link #read(byte[], int, int)} method. - * + * * MUST be overridden if the {@link #read(byte[], int, int)} method * is not overridden; may be overridden otherwise. - * + * * @return the byte read, or -1 if end of input is reached * @throws IOException * if an I/O error has occurred @@ -85,7 +85,7 @@ public abstract class ArchiveInputStream 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 int read) { @@ -95,7 +95,7 @@ public abstract class ArchiveInputStream 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 */ @@ -107,7 +107,7 @@ public abstract class ArchiveInputStream extends InputStream { /** * Decrements the counter of already read bytes. - * + * * @param pushedBack the number of bytes pushed back. * @since 1.1 */ @@ -137,15 +137,15 @@ public abstract class ArchiveInputStream extends InputStream { /** * Whether this stream is able to read the given entry. - * + * * <p> * Some archive formats support variants or details that are not supported (yet). * </p> - * + * * @param archiveEntry * the entry to test * @return This implementation always returns true. - * + * * @since 1.1 */ public boolean canReadEntryData(final ArchiveEntry archiveEntry) { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java index 9ca9a83..4377b6d 100644 --- a/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java @@ -27,7 +27,7 @@ import java.io.OutputStream; * {@link #write(byte[], int, int)} method to improve performance. * They should also override {@link #close()} to ensure that any necessary * trailers are added. - * + * * <p>The normal sequence of calls when working with ArchiveOutputStreams is:</p> * <ul> * <li>Create ArchiveOutputStream object,</li> @@ -58,7 +58,7 @@ public abstract class ArchiveOutputStream extends OutputStream { * Writes the headers for an archive entry to the output stream. * The caller must then write the content to the stream and call * {@link #closeArchiveEntry()} to complete the process. - * + * * @param entry describes the entry * @throws IOException if an I/O error occurs */ @@ -74,18 +74,18 @@ public abstract class ArchiveOutputStream extends OutputStream { /** * Finishes the addition of entries to this stream, without closing it. * Additional data can be written, if the format supports it. - * + * * @throws IOException if the user forgets to close the entry. */ public abstract void finish() throws IOException; /** * Create an archive entry using the inputFile and entryName provided. - * + * * @param inputFile the file to create the entry from * @param entryName name to use for the entry * @return the ArchiveEntry set up with details from the file - * + * * @throws IOException if an I/O error occurs */ public abstract ArchiveEntry createArchiveEntry(File inputFile, String entryName) throws IOException; @@ -99,7 +99,7 @@ public abstract class ArchiveOutputStream extends OutputStream { * * <p>MUST be overridden if the {@link #write(byte[], int, int)} method * is not overridden; may be overridden otherwise. - * + * * @param b The byte to be written. * @throws IOException on error */ @@ -112,7 +112,7 @@ public abstract class ArchiveOutputStream extends OutputStream { /** * Increments the counter of already written bytes. * Doesn't increment if EOF has been hit ({@code written == -1}). - * + * * @param written the number of bytes written */ protected void count(final int written) { @@ -122,7 +122,7 @@ public abstract class ArchiveOutputStream extends OutputStream { /** * Increments the counter of already written bytes. * Doesn't increment if EOF has been hit ({@code written == -1}). - * + * * @param written the number of bytes written * @since 1.1 */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java b/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java index 916e3e1..3cd8ba7 100644 --- a/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java +++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java @@ -55,9 +55,9 @@ import org.apache.commons.compress.utils.Sets; * the InputStream. In order to add other implementations, you should extend * ArchiveStreamFactory and override the appropriate methods (and call their * implementation from super of course). - * + * * Compressing a ZIP-File: - * + * * <pre> * final OutputStream out = Files.newOutputStream(output.toPath()); * ArchiveOutputStream os = new ArchiveStreamFactory().createArchiveOutputStream(ArchiveStreamFactory.ZIP, out); http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamProvider.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamProvider.java b/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamProvider.java index bae8bb5..eb1862c 100644 --- a/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamProvider.java +++ b/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamProvider.java @@ -25,7 +25,7 @@ import java.util.Set; /** * Creates Archive {@link ArchiveInputStream}s and {@link ArchiveOutputStream}s. - * + * * @since 1.13 */ public interface ArchiveStreamProvider { @@ -33,7 +33,7 @@ public interface ArchiveStreamProvider { /** * Creates an archive input stream from an archiver name and an input * stream. - * + * * @param name * the archive name, i.e. * {@value org.apache.commons.compress.archivers.ArchiveStreamFactory#AR}, @@ -63,7 +63,7 @@ public interface ArchiveStreamProvider { /** * Creates an archive output stream from an archiver name and an output * stream. - * + * * @param name * the archive name, i.e. * {@value org.apache.commons.compress.archivers.ArchiveStreamFactory#AR}, @@ -89,14 +89,14 @@ public interface ArchiveStreamProvider { /** * Gets all the input stream archive names for this provider - * + * * @return all the input archive names for this provider */ Set<String> getInputStreamArchiveNames(); /** * Gets all the output stream archive names for this provider - * + * * @return all the output archive names for this provider */ Set<String> getOutputStreamArchiveNames(); http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/StreamingNotSupportedException.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/StreamingNotSupportedException.java b/src/main/java/org/apache/commons/compress/archivers/StreamingNotSupportedException.java index eff0183..9f12a7a 100644 --- a/src/main/java/org/apache/commons/compress/archivers/StreamingNotSupportedException.java +++ b/src/main/java/org/apache/commons/compress/archivers/StreamingNotSupportedException.java @@ -20,18 +20,18 @@ package org.apache.commons.compress.archivers; /** * Exception thrown by ArchiveStreamFactory if a format is requested/detected that doesn't support streaming. - * + * * @since 1.8 */ public class StreamingNotSupportedException extends ArchiveException { - + private static final long serialVersionUID = 1L; - + private final String format; /** * Creates a new StreamingNotSupportedException. - * + * * @param format the format that has been requested/detected. */ public StreamingNotSupportedException(final String format) { @@ -41,11 +41,11 @@ public class StreamingNotSupportedException extends ArchiveException { /** * Returns the format that has been requested/detected. - * + * * @return the format that has been requested/detected. */ public String getFormat() { return format; } - + } http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java index adf5d86..d1ce649 100644 --- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java +++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java @@ -25,10 +25,10 @@ import org.apache.commons.compress.archivers.ArchiveEntry; /** * Represents an archive entry in the "ar" format. - * + * * Each AR archive starts with "!<arch>" followed by a LF. After these 8 bytes * the archive entries are listed. The format of an entry header is as it follows: - * + * * <pre> * START BYTE END BYTE NAME FORMAT LENGTH * 0 15 File name ASCII 16 @@ -39,14 +39,14 @@ import org.apache.commons.compress.archivers.ArchiveEntry; * 48 57 File size (bytes) Decimal 10 * 58 59 File magic \140\012 2 * </pre> - * + * * This specifies that an ar archive entry header contains 60 bytes. - * + * * Due to the limitation of the file name length to 16 bytes GNU and * BSD has their own variants of this format. Currently Commons * Compress can read but not write the GNU variant. It fully supports * the BSD variant. - * + * * @see <a href="http://www.freebsd.org/cgi/man.cgi?query=ar&sektion=5">ar man page</a> * * @Immutable @@ -68,7 +68,7 @@ public class ArArchiveEntry implements ArchiveEntry { private final int userId; private final int groupId; private final int mode; - private static final int DEFAULT_MODE = 33188; // = (octal) 0100644 + private static final int DEFAULT_MODE = 33188; // = (octal) 0100644 private final long lastModified; private final long length; http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java index 69bc640..c2de3ee 100644 --- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java @@ -29,9 +29,9 @@ import org.apache.commons.compress.utils.IOUtils; /** * Implements the "ar" archive format as an input stream. - * + * * @NotThreadSafe - * + * */ public class ArArchiveInputStream extends ArchiveInputStream { @@ -63,7 +63,7 @@ public class ArArchiveInputStream extends ArchiveInputStream { /** * Constructs an Ar input stream with the referenced stream - * + * * @param pInput * the ar input stream */ @@ -74,7 +74,7 @@ public class ArArchiveInputStream extends ArchiveInputStream { /** * Returns the next AR entry in this stream. - * + * * @return the next AR entry. * @throws IOException * if the entry could not be read @@ -167,7 +167,7 @@ public class ArArchiveInputStream extends ArchiveInputStream { /** * Get an extended name from the GNU extended name buffer. - * + * * @param offset pointer to entry within the buffer * @return the extended file name; without trailing "/" if present. * @throws IOException if name not found or buffer not set up @@ -213,7 +213,7 @@ public class ArArchiveInputStream extends ArchiveInputStream { /* * (non-Javadoc) - * + * * @see * org.apache.commons.compress.archivers.ArchiveInputStream#getNextEntry() */ @@ -224,7 +224,7 @@ public class ArArchiveInputStream extends ArchiveInputStream { /* * (non-Javadoc) - * + * * @see java.io.InputStream#close() */ @Override @@ -238,7 +238,7 @@ public class ArArchiveInputStream extends ArchiveInputStream { /* * (non-Javadoc) - * + * * @see java.io.InputStream#read(byte[], int, int) */ @Override @@ -261,7 +261,7 @@ public class ArArchiveInputStream extends ArchiveInputStream { /** * Checks if the signature matches ASCII "!<arch>" followed by a single LF * control character - * + * * @param signature * the bytes to check * @param length @@ -366,7 +366,7 @@ public class ArArchiveInputStream extends ArchiveInputStream { * <p>A header references an extended filename by storing a "/" * followed by a decimal offset to the start of the filename in * the extended filename data section.</p> - * + * * <p>The format of the "//" file itself is simply a list of the * long filenames, each separated by one or more LF * characters. Note that the decimal offsets are number of http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java index aa3a0db..ffca90b 100644 --- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java @@ -28,7 +28,7 @@ import org.apache.commons.compress.utils.ArchiveUtils; /** * Implements the "ar" archive format as an output stream. - * + * * @NotThreadSafe */ public class ArArchiveOutputStream extends ArchiveOutputStream { @@ -110,7 +110,7 @@ public class ArArchiveOutputStream extends ArchiveOutputStream { haveUnclosedEntry = true; } - private long fill( final long pOffset, final long pNewOffset, final char pFill ) throws IOException { + private long fill( final long pOffset, final long pNewOffset, final char pFill ) throws IOException { final long diff = pNewOffset - pOffset; if (diff > 0) { @@ -137,7 +137,7 @@ public class ArArchiveOutputStream extends ArchiveOutputStream { if (LONGFILE_ERROR == longFileMode && n.length() > 16) { throw new IOException("filename too long, > 16 chars: "+n); } - if (LONGFILE_BSD == longFileMode && + if (LONGFILE_BSD == longFileMode && (n.length() > 16 || n.contains(" "))) { mustAppendName = true; offset += write(ArArchiveInputStream.BSD_LONGNAME_PREFIX http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java index a275a43..e66dc55 100644 --- a/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java +++ b/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java @@ -26,17 +26,17 @@ import org.apache.commons.compress.archivers.zip.ZipUtil; /** * An entry in an ARJ archive. - * + * * @NotThreadSafe * @since 1.6 */ public class ArjArchiveEntry implements ArchiveEntry { private final LocalFileHeader localFileHeader; - + public ArjArchiveEntry() { localFileHeader = new LocalFileHeader(); } - + ArjArchiveEntry(final LocalFileHeader localFileHeader) { this.localFileHeader = localFileHeader; } @@ -158,5 +158,5 @@ public class ArjArchiveEntry implements ArchiveEntry { public static final int WIN95 = 10; public static final int WIN32 = 11; } - + } http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java ---------------------------------------------------------------------- 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 eb6f070..c22d4c0 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 @@ -47,7 +47,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { private final MainHeader mainHeader; private LocalFileHeader currentLocalFileHeader = null; private InputStream currentInputStream = null; - + /** * Constructs the ArjInputStream, taking ownership of the inputStream that is passed in. * @param inputStream the underlying stream, whose ownership is taken @@ -82,7 +82,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { throws ArchiveException { this(inputStream, "CP437"); } - + @Override public void close() throws IOException { in.close(); @@ -105,7 +105,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { count(4); return Integer.reverseBytes(value); } - + private String readString(final DataInputStream dataIn) throws IOException { final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); int nextByte; @@ -118,13 +118,13 @@ public class ArjArchiveInputStream extends ArchiveInputStream { // intentionally using the default encoding as that's the contract for a null charsetName return new String(buffer.toByteArray()); } - + private void readFully(final DataInputStream dataIn, final byte[] b) throws IOException { dataIn.readFully(b); count(b.length); } - + private byte[] readHeader() throws IOException { boolean found = false; byte[] basicHeaderBytes = null; @@ -153,7 +153,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { } while (!found); return basicHeaderBytes; } - + private MainHeader readMainHeader() throws IOException { final byte[] basicHeaderBytes = readHeader(); if (basicHeaderBytes == null) { @@ -161,13 +161,13 @@ public class ArjArchiveInputStream extends ArchiveInputStream { } final DataInputStream basicHeader = new DataInputStream( new ByteArrayInputStream(basicHeaderBytes)); - + final int firstHeaderSize = basicHeader.readUnsignedByte(); final byte[] firstHeaderBytes = new byte[firstHeaderSize - 1]; basicHeader.readFully(firstHeaderBytes); final DataInputStream firstHeader = new DataInputStream( new ByteArrayInputStream(firstHeaderBytes)); - + final MainHeader hdr = new MainHeader(); hdr.archiverVersionNumber = firstHeader.readUnsignedByte(); hdr.minVersionToExtract = firstHeader.readUnsignedByte(); @@ -185,7 +185,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { pushedBackBytes(20); // count has already counted them via readFully hdr.encryptionVersion = firstHeader.readUnsignedByte(); hdr.lastChapter = firstHeader.readUnsignedByte(); - + if (firstHeaderSize >= 33) { hdr.arjProtectionFactor = firstHeader.readUnsignedByte(); hdr.arjFlags2 = firstHeader.readUnsignedByte(); @@ -195,7 +195,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { hdr.name = readString(basicHeader); hdr.comment = readString(basicHeader); - + final int extendedHeaderSize = read16(in); if (extendedHeaderSize > 0) { hdr.extendedHeaderBytes = new byte[extendedHeaderSize]; @@ -207,10 +207,10 @@ public class ArjArchiveInputStream extends ArchiveInputStream { throw new IOException("Extended header CRC32 verification failure"); } } - + return hdr; } - + private LocalFileHeader readLocalFileHeader() throws IOException { final byte[] basicHeaderBytes = readHeader(); if (basicHeaderBytes == null) { @@ -265,7 +265,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { } } } - + private void readExtraData(final int firstHeaderSize, final DataInputStream firstHeader, final LocalFileHeader localFileHeader) throws IOException { if (firstHeaderSize >= 33) { @@ -294,7 +294,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { (0xff & signature[0]) == ARJ_MAGIC_1 && (0xff & signature[1]) == ARJ_MAGIC_2; } - + /** * Gets the archive's recorded name. * @return the archive's name @@ -302,7 +302,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { public String getArchiveName() { return mainHeader.name; } - + /** * Gets the archive's comment. * @return the archive's comment @@ -310,7 +310,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { public String getArchiveComment() { return mainHeader.comment; } - + @Override public ArjArchiveEntry getNextEntry() throws IOException { if (currentInputStream != null) { @@ -320,7 +320,7 @@ public class ArjArchiveInputStream extends ArchiveInputStream { currentLocalFileHeader = null; currentInputStream = null; } - + currentLocalFileHeader = readLocalFileHeader(); if (currentLocalFileHeader != null) { currentInputStream = new BoundedInputStream(in, currentLocalFileHeader.compressedSize); http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/arj/LocalFileHeader.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/arj/LocalFileHeader.java b/src/main/java/org/apache/commons/compress/archivers/arj/LocalFileHeader.java index 4629213..6ecb297 100644 --- a/src/main/java/org/apache/commons/compress/archivers/arj/LocalFileHeader.java +++ b/src/main/java/org/apache/commons/compress/archivers/arj/LocalFileHeader.java @@ -35,17 +35,17 @@ class LocalFileHeader { int fileAccessMode; int firstChapter; int lastChapter; - + int extendedFilePosition; int dateTimeAccessed; int dateTimeCreated; int originalSizeEvenForVolumes; - + String name; String comment; - + byte[][] extendedHeaders = null; - + static class Flags { static final int GARBLED = 0x01; static final int VOLUME = 0x04; @@ -53,7 +53,7 @@ class LocalFileHeader { static final int PATHSYM = 0x10; static final int BACKUP = 0x20; } - + static class FileTypes { static final int BINARY = 0; static final int SEVEN_BIT_TEXT = 1; @@ -61,7 +61,7 @@ class LocalFileHeader { static final int VOLUME_LABEL = 4; static final int CHAPTER_LABEL = 5; } - + static class Methods { static final int STORED = 0; static final int COMPRESSED_MOST = 1; http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/arj/MainHeader.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/arj/MainHeader.java b/src/main/java/org/apache/commons/compress/archivers/arj/MainHeader.java index a41aa72..7a9f212 100644 --- a/src/main/java/org/apache/commons/compress/archivers/arj/MainHeader.java +++ b/src/main/java/org/apache/commons/compress/archivers/arj/MainHeader.java @@ -40,7 +40,7 @@ class MainHeader { String name; String comment; byte[] extendedHeaderBytes = null; - + static class Flags { static final int GARBLED = 0x01; static final int OLD_SECURED_NEW_ANSI_PAGE = 0x02; @@ -52,7 +52,7 @@ class MainHeader { static final int ALTNAME = 0x80; } - + @Override public String toString() { final StringBuilder builder = new StringBuilder(); http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java index ef0fc1f..cb48ef4 100644 --- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java +++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java @@ -27,7 +27,7 @@ import org.apache.commons.compress.archivers.ArchiveEntry; * A cpio archive consists of a sequence of files. There are several types of * headers defided in two categories of new and old format. The headers are * recognized by magic numbers: - * + * * <ul> * <li>"070701" ASCII for new portable format</li> * <li>"070702" ASCII for new portable format with CRC</li> @@ -39,38 +39,38 @@ import org.apache.commons.compress.archivers.ArchiveEntry; * <p>The old binary format is limited to 16 bits for user id, group * id, device, and inode numbers. It is limited to 4 gigabyte file * sizes. - * + * * The old ASCII format is limited to 18 bits for the user id, group * id, device, and inode numbers. It is limited to 8 gigabyte file * sizes. - * + * * The new ASCII format is limited to 4 gigabyte file sizes. - * + * * CPIO 2.5 knows also about tar, but it is not recognized here.</p> - * - * + * + * * <h3>OLD FORMAT</h3> - * + * * <p>Each file has a 76 (ascii) / 26 (binary) byte header, a variable * length, NUL terminated filename, and variable length file data. A * header for a filename "TRAILER!!!" indicates the end of the * archive.</p> - * + * * <p>All the fields in the header are ISO 646 (approximately ASCII) * strings of octal numbers, left padded, not NUL terminated.</p> - * + * * <pre> - * FIELDNAME NOTES + * FIELDNAME NOTES * c_magic The integer value octal 070707. This value can be used to deter- * mine whether this archive is written with little-endian or big- * endian integers. - * c_dev Device that contains a directory entry for this file - * c_ino I-node number that identifies the input file to the file system + * c_dev Device that contains a directory entry for this file + * c_ino I-node number that identifies the input file to the file system * c_mode The mode specifies both the regular permissions and the file type. - * c_uid Numeric User ID of the owner of the input file - * c_gid Numeric Group ID of the owner of the input file - * c_nlink Number of links that are connected to the input file - * c_rdev For block special and character special entries, this field + * c_uid Numeric User ID of the owner of the input file + * c_gid Numeric Group ID of the owner of the input file + * c_nlink Number of links that are connected to the input file + * c_rdev For block special and character special entries, this field * contains the associated device number. For all other entry types, * it should be set to zero by writers and ignored by readers. * c_mtime[2] Modification time of the file, indicated as the number of seconds @@ -78,33 +78,33 @@ import org.apache.commons.compress.archivers.ArchiveEntry; * four-byte integer is stored with the most-significant 16 bits * first followed by the least-significant 16 bits. Each of the two * 16 bit values are stored in machine-native byte order. - * c_namesize Length of the path name, including the terminating null byte - * c_filesize[2] Length of the file in bytes. This is the length of the data - * section that follows the header structure. Must be 0 for + * c_namesize Length of the path name, including the terminating null byte + * c_filesize[2] Length of the file in bytes. This is the length of the data + * section that follows the header structure. Must be 0 for * FIFOs and directories * * All fields are unsigned short fields with 16-bit integer values * apart from c_mtime and c_filesize which are 32-bit integer values * </pre> - * + * * <p>If necessary, the filename and file data are padded with a NUL byte to an even length</p> - * + * * <p>Special files, directories, and the trailer are recorded with * the h_filesize field equal to 0.</p> - * + * * <p>In the ASCII version of this format, the 16-bit entries are represented as 6-byte octal numbers, * and the 32-bit entries are represented as 11-byte octal numbers. No padding is added.</p> - * + * * <h3>NEW FORMAT</h3> - * + * * <p>Each file has a 110 byte header, a variable length, NUL * terminated filename, and variable length file data. A header for a * filename "TRAILER!!!" indicates the end of the archive. All the * fields in the header are ISO 646 (approximately ASCII) strings of * hexadecimal numbers, left padded, not NUL terminated.</p> - * + * * <pre> - * FIELDNAME NOTES + * FIELDNAME NOTES * c_magic[6] The string 070701 for new ASCII, the string 070702 for new ASCII with CRC * c_ino[8] * c_mode[8] @@ -112,31 +112,31 @@ import org.apache.commons.compress.archivers.ArchiveEntry; * c_gid[8] * c_nlink[8] * c_mtim[8] - * c_filesize[8] must be 0 for FIFOs and directories + * c_filesize[8] must be 0 for FIFOs and directories * c_maj[8] - * c_min[8] - * c_rmaj[8] only valid for chr and blk special files - * c_rmin[8] only valid for chr and blk special files - * c_namesize[8] count includes terminating NUL in pathname + * c_min[8] + * c_rmaj[8] only valid for chr and blk special files + * c_rmin[8] only valid for chr and blk special files + * c_namesize[8] count includes terminating NUL in pathname * c_check[8] 0 for "new" portable format; for CRC format * the sum of all the bytes in the file * </pre> - * + * * <p>New ASCII Format The "new" ASCII format uses 8-byte hexadecimal * fields for all numbers and separates device numbers into separate * fields for major and minor numbers.</p> - * + * * <p>The pathname is followed by NUL bytes so that the total size of * the fixed header plus pathname is a multiple of four. Likewise, the * file data is padded to a multiple of four bytes.</p> - * + * * <p>This class uses mutable fields and is not considered to be * threadsafe.</p> - * + * * <p>Based on code from the jRPM project (http://jrpm.sourceforge.net).</p> * * <p>The MAGIC numbers and other constants are defined in {@link CpioConstants}</p> - * + * * <p> * N.B. does not handle the cpio "tar" format * </p> @@ -150,7 +150,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * See constructor documenation for possible values. */ - private final short fileFormat; + private final short fileFormat; /** The number of bytes in each header record; depends on the file format */ private final int headerSize; @@ -189,7 +189,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Creates a CpioArchiveEntry with a specified format. - * + * * @param format * The cpio format for this entry. * <p> @@ -228,7 +228,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Creates a CpioArchiveEntry with a specified name. The format of * this entry will be the new format. - * + * * @param name * The name of this entry. */ @@ -238,7 +238,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Creates a CpioArchiveEntry with a specified name. - * + * * @param format * The cpio format for this entry. * @param name @@ -251,7 +251,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { * CpioConstants.FORMAT_OLD_BINARY * CpioConstants.FORMAT_OLD_ASCII * </pre> - * + * * @since 1.1 */ public CpioArchiveEntry(final short format, final String name) { @@ -262,7 +262,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Creates a CpioArchiveEntry with a specified name. The format of * this entry will be the new format. - * + * * @param name * The name of this entry. * @param size @@ -275,7 +275,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Creates a CpioArchiveEntry with a specified name. - * + * * @param format * The cpio format for this entry. * @param name @@ -290,7 +290,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { * CpioConstants.FORMAT_OLD_BINARY * CpioConstants.FORMAT_OLD_ASCII * </pre> - * + * * @since 1.1 */ public CpioArchiveEntry(final short format, final String name, @@ -303,7 +303,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { * Creates a CpioArchiveEntry with a specified name for a * specified file. The format of this entry will be the new * format. - * + * * @param inputFile * The file to gather information from. * @param entryName @@ -316,7 +316,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Creates a CpioArchiveEntry with a specified name for a * specified file. - * + * * @param format * The cpio format for this entry. * @param inputFile @@ -331,7 +331,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { * CpioConstants.FORMAT_OLD_BINARY * CpioConstants.FORMAT_OLD_ASCII * </pre> - * + * * @since 1.1 */ public CpioArchiveEntry(final short format, final File inputFile, @@ -370,7 +370,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the checksum. * Only supported for the new formats. - * + * * @return Returns the checksum. * @throws UnsupportedOperationException if the format is not a new format */ @@ -381,7 +381,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the device id. - * + * * @return Returns the device id. * @throws UnsupportedOperationException * if this method is called for a CpioArchiveEntry with a new @@ -394,7 +394,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the major device id. - * + * * @return Returns the major device id. * @throws UnsupportedOperationException * if this method is called for a CpioArchiveEntry with an old @@ -407,7 +407,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the minor device id - * + * * @return Returns the minor device id. * @throws UnsupportedOperationException if format is not a new format */ @@ -418,7 +418,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the filesize. - * + * * @return Returns the filesize. * @see org.apache.commons.compress.archivers.ArchiveEntry#getSize() */ @@ -429,7 +429,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the format for this entry. - * + * * @return Returns the format. */ public short getFormat() { @@ -438,7 +438,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the group id. - * + * * @return Returns the group id. */ public long getGID() { @@ -447,7 +447,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the header size for this CPIO format - * + * * @return Returns the header size in bytes. */ public int getHeaderSize() { @@ -456,7 +456,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the alignment boundary for this CPIO format - * + * * @return Returns the aligment boundary (0, 2, 4) in bytes */ public int getAlignmentBoundary() { @@ -465,7 +465,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the number of bytes needed to pad the header to the alignment boundary. - * + * * @return the number of bytes needed to pad the header (0,1,2,3) */ public int getHeaderPadCount(){ @@ -483,7 +483,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the number of bytes needed to pad the data to the alignment boundary. - * + * * @return the number of bytes needed to pad the data (0,1,2,3) */ public int getDataPadCount(){ @@ -498,7 +498,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the inode. - * + * * @return Returns the inode. */ public long getInode() { @@ -507,7 +507,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the mode of this entry (e.g. directory, regular file). - * + * * @return Returns the mode. */ public long getMode() { @@ -516,7 +516,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the name. - * + * * @return Returns the name. */ @Override @@ -526,7 +526,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the number of links. - * + * * @return Returns the number of links. */ public long getNumberOfLinks() { @@ -537,7 +537,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the remote device id. - * + * * @return Returns the remote device id. * @throws UnsupportedOperationException * if this method is called for a CpioArchiveEntry with a new @@ -550,7 +550,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the remote major device id. - * + * * @return Returns the remote major device id. * @throws UnsupportedOperationException * if this method is called for a CpioArchiveEntry with an old @@ -563,7 +563,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the remote minor device id. - * + * * @return Returns the remote minor device id. * @throws UnsupportedOperationException * if this method is called for a CpioArchiveEntry with an old @@ -576,7 +576,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the time in seconds. - * + * * @return Returns the time. */ public long getTime() { @@ -590,7 +590,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Get the user id. - * + * * @return Returns the user id. */ public long getUID() { @@ -599,7 +599,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Check if this entry represents a block device. - * + * * @return TRUE if this entry is a block device. */ public boolean isBlockDevice() { @@ -608,7 +608,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Check if this entry represents a character device. - * + * * @return TRUE if this entry is a character device. */ public boolean isCharacterDevice() { @@ -617,7 +617,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Check if this entry represents a directory. - * + * * @return TRUE if this entry is a directory. */ @Override @@ -627,7 +627,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Check if this entry represents a network device. - * + * * @return TRUE if this entry is a network device. */ public boolean isNetwork() { @@ -636,7 +636,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Check if this entry represents a pipe. - * + * * @return TRUE if this entry is a pipe. */ public boolean isPipe() { @@ -645,7 +645,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Check if this entry represents a regular file. - * + * * @return TRUE if this entry is a regular file. */ public boolean isRegularFile() { @@ -654,7 +654,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Check if this entry represents a socket. - * + * * @return TRUE if this entry is a socket. */ public boolean isSocket() { @@ -663,7 +663,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Check if this entry represents a symbolic link. - * + * * @return TRUE if this entry is a symbolic link. */ public boolean isSymbolicLink() { @@ -673,7 +673,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the checksum. The checksum is calculated by adding all bytes of a * file to transfer (crc += buf[pos] & 0xFF). - * + * * @param chksum * The checksum to set. */ @@ -684,7 +684,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the device id. - * + * * @param device * The device id to set. * @throws UnsupportedOperationException @@ -698,7 +698,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set major device id. - * + * * @param maj * The major device id to set. */ @@ -709,7 +709,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the minor device id - * + * * @param min * The minor device id to set. */ @@ -720,7 +720,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the filesize. - * + * * @param size * The filesize to set. */ @@ -734,7 +734,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the group id. - * + * * @param gid * The group id to set. */ @@ -744,7 +744,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the inode. - * + * * @param inode * The inode to set. */ @@ -754,7 +754,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the mode of this entry (e.g. directory, regular file). - * + * * @param mode * The mode to set. */ @@ -773,7 +773,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { default: throw new IllegalArgumentException( "Unknown mode. " - + "Full: " + Long.toHexString(mode) + + "Full: " + Long.toHexString(mode) + " Masked: " + Long.toHexString(maskedMode)); } @@ -782,7 +782,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the name. - * + * * @param name * The name to set. */ @@ -792,7 +792,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the number of links. - * + * * @param nlink * The number of links to set. */ @@ -802,7 +802,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the remote device id. - * + * * @param device * The remote device id to set. * @throws UnsupportedOperationException @@ -816,7 +816,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the remote major device id. - * + * * @param rmaj * The remote major device id to set. * @throws UnsupportedOperationException @@ -830,7 +830,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the remote minor device id. - * + * * @param rmin * The remote minor device id to set. * @throws UnsupportedOperationException @@ -844,7 +844,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the time in seconds. - * + * * @param time * The time to set. */ @@ -854,7 +854,7 @@ public class CpioArchiveEntry implements CpioConstants, ArchiveEntry { /** * Set the user id. - * + * * @param uid * The user id to set. */ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java ---------------------------------------------------------------------- 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 69bfc87..ad8e125 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 @@ -58,9 +58,9 @@ import org.apache.commons.compress.utils.IOUtils; * </pre> * <p> * Note: This implementation should be compatible to cpio 2.5 - * + * * <p>This class uses mutable fields and is not considered to be threadsafe. - * + * * <p>Based on code from the jRPM project (jrpm.sourceforge.net) */ @@ -100,7 +100,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements * Construct the cpio input stream with a blocksize of {@link * CpioConstants#BLOCK_SIZE BLOCK_SIZE} and expecting ASCII file * names. - * + * * @param in * The cpio stream */ @@ -111,7 +111,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements /** * Construct the cpio input stream with a blocksize of {@link * CpioConstants#BLOCK_SIZE BLOCK_SIZE}. - * + * * @param in * The cpio stream * @param encoding @@ -127,7 +127,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements * Construct the cpio input stream with a blocksize of {@link * CpioConstants#BLOCK_SIZE BLOCK_SIZE} expecting ASCII file * names. - * + * * @param in * The cpio stream * @param blockSize @@ -140,7 +140,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements /** * Construct the cpio input stream with a blocksize of {@link CpioConstants#BLOCK_SIZE BLOCK_SIZE}. - * + * * @param in * The cpio stream * @param blockSize @@ -163,7 +163,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements * <p> * Programs should not count on this method to return the actual number of * bytes that could be read without blocking. - * + * * @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 @@ -180,7 +180,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements /** * Closes the CPIO input stream. - * + * * @throws IOException * if an I/O error has occurred */ @@ -195,7 +195,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements /** * Closes the current CPIO entry and positions the stream for reading the * next entry. - * + * * @throws IOException * if an I/O error has occurred or if a CPIO file error has * occurred @@ -210,7 +210,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements /** * Check to make sure that this stream has not been closed - * + * * @throws IOException * if the stream is already closed */ @@ -223,7 +223,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements /** * Reads the next CPIO file entry and positions stream at the beginning of * the entry data. - * + * * @return the CpioArchiveEntry just read * @throws IOException * if an I/O error has occurred or if a CPIO file error has @@ -283,7 +283,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements /** * Reads from the current CPIO entry into an array of bytes. Blocks until * some input is available. - * + * * @param b * the buffer into which the data is read * @param off @@ -464,7 +464,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements /** * Skips specified number of bytes in the current CPIO entry. - * + * * @param n * the number of bytes to skip * @return the actual number of bytes skipped @@ -520,15 +520,15 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements /** * Checks if the signature matches one of the following magic values: - * + * * Strings: * * "070701" - MAGIC_NEW * "070702" - MAGIC_NEW_CRC * "070707" - MAGIC_OLD_ASCII - * + * * Octal Binary value: - * + * * 070707 - MAGIC_OLD_BINARY (held as a short) = 0x71C7 or 0xC771 * @param signature data to match * @param length length of data http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java index 6423b52..4b7158f 100644 --- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java @@ -56,9 +56,9 @@ import org.apache.commons.compress.utils.CharsetNames; * </pre> * * <p>Note: This implementation should be compatible to cpio 2.5</p> - * + * * <p>This class uses mutable fields and is not considered threadsafe.</p> - * + * * <p>based on code from the jRPM project (jrpm.sourceforge.net)</p> */ public class CpioArchiveOutputStream extends ArchiveOutputStream implements @@ -101,7 +101,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements * Construct the cpio output stream with a specified format, a * blocksize of {@link CpioConstants#BLOCK_SIZE BLOCK_SIZE} and * using ASCII as the file name encoding. - * + * * @param out * The cpio stream * @param format @@ -114,25 +114,25 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements /** * Construct the cpio output stream with a specified format using * ASCII as the file name encoding. - * + * * @param out * The cpio stream * @param format * The format of the stream * @param blockSize * The block size of the archive. - * + * * @since 1.1 */ public CpioArchiveOutputStream(final OutputStream out, final short format, final int blockSize) { this(out, format, blockSize, CharsetNames.US_ASCII); - } + } /** * Construct the cpio output stream with a specified format using * ASCII as the file name encoding. - * + * * @param out * The cpio stream * @param format @@ -142,7 +142,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements * @param encoding * The encoding of file names to write - use null for * the platform's default. - * + * * @since 1.6 */ public CpioArchiveOutputStream(final OutputStream out, final short format, @@ -167,7 +167,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements /** * Construct the cpio output stream. The format for this CPIO stream is the * "new" format using ASCII encoding for file names - * + * * @param out * The cpio stream */ @@ -178,7 +178,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements /** * Construct the cpio output stream. The format for this CPIO stream is the * "new" format. - * + * * @param out * The cpio stream * @param encoding @@ -192,7 +192,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements /** * Check to make sure that this stream has not been closed - * + * * @throws IOException * if the stream is already closed */ @@ -208,7 +208,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements * current time will be used if the entry has no set modification time and * the default header format will be used if no other format is specified in * the entry. - * + * * @param entry * the CPIO cpioEntry to be written * @throws IOException @@ -367,7 +367,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements } /*(non-Javadoc) - * + * * @see * org.apache.commons.compress.archivers.ArchiveOutputStream#closeArchiveEntry * () @@ -402,7 +402,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements /** * Writes an array of bytes to the current CPIO entry data. This method will * block until all the bytes are written. - * + * * @param b * the data to be written * @param off @@ -444,7 +444,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements * Finishes writing the contents of the CPIO output stream without closing * the underlying stream. Use this method when applying multiple filters in * succession to the same output stream. - * + * * @throws IOException * if an I/O exception has occurred or if a CPIO file error has * occurred @@ -475,7 +475,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements /** * Closes the CPIO output stream as well as the stream being filtered. - * + * * @throws IOException * if an I/O error has occurred or if a CPIO file error has * occurred @@ -548,7 +548,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements /** * Creates a new ArchiveEntry. The entryName must be an ASCII encoded string. - * + * * @see org.apache.commons.compress.archivers.ArchiveOutputStream#createArchiveEntry(java.io.File, java.lang.String) */ @Override http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java index 398ace4..efba282 100644 --- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java +++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java @@ -20,9 +20,9 @@ package org.apache.commons.compress.archivers.cpio; /** * All constants needed by CPIO. - * - * based on code from the jRPM project (jrpm.sourceforge.net) - * + * + * based on code from the jRPM project (jrpm.sourceforge.net) + * */ public interface CpioConstants { /** magic number of a cpio entry in the new format */ @@ -136,7 +136,7 @@ public interface CpioConstants { /** * The default block size. - * + * * @since 1.1 */ int BLOCK_SIZE = 512; http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/cpio/CpioUtil.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioUtil.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioUtil.java index aba485f..f53ea44 100644 --- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioUtil.java +++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioUtil.java @@ -20,7 +20,7 @@ package org.apache.commons.compress.archivers.cpio; /** * Package private utility class for Cpio - * + * * @Immutable */ class CpioUtil { @@ -35,7 +35,7 @@ class CpioUtil { /** * Converts a byte array to a long. Halfwords can be swapped by setting * swapHalfWord=true. - * + * * @param number * An array of bytes containing a number * @param swapHalfWord @@ -71,12 +71,12 @@ class CpioUtil { } /** - * Converts a long number to a byte array + * Converts a long number to a byte array * Halfwords can be swapped by setting swapHalfWord=true. - * - * @param number + * + * @param number * the input long number to be converted - * + * * @param length * The length of the returned array * @param swapHalfWord http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java ---------------------------------------------------------------------- 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 72eefd7..ed4f02f 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 @@ -413,7 +413,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream { * @return full path for specified archive entry, or null if there's a gap. */ private String getPath(final DumpArchiveEntry entry) { - // build the stack of elements. It's possible that we're + // build the stack of elements. It's possible that we're // still missing an intermediate value and if so we final Stack<String> elements = new Stack<>(); Dirent dirent = null; http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java b/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java index e82db2d..5643dec 100644 --- a/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java @@ -107,7 +107,7 @@ class TapeInputStream extends FilterInputStream { /** * {@inheritDoc} * - * <p>reads the full given length unless EOF is reached.</p> + * <p>reads the full given length unless EOF is reached.</p> * * @param len length to read, must be a multiple of the stream's * record size @@ -157,7 +157,7 @@ class TapeInputStream extends FilterInputStream { /** * Skip bytes. Same as read but without the arraycopy. * - * <p>skips the full given length unless EOF is reached.</p> + * <p>skips the full given length unless EOF is reached.</p> * * @param len length to read, must be a multiple of the stream's * record size http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java index 95f4788..47b1583 100644 --- a/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java @@ -27,14 +27,14 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; /** * Implements an input stream that can read entries from jar files. - * + * * @NotThreadSafe */ public class JarArchiveInputStream extends ZipArchiveInputStream { /** * Creates an instance from the input stream using the default encoding. - * + * * @param inputStream the input stream to wrap */ public JarArchiveInputStream( final InputStream inputStream ) { @@ -43,7 +43,7 @@ public class JarArchiveInputStream extends ZipArchiveInputStream { /** * Creates an instance from the input stream using the specified encoding. - * + * * @param inputStream the input stream to wrap * @param encoding the encoding to use * @since 1.10 @@ -65,7 +65,7 @@ public class JarArchiveInputStream extends ZipArchiveInputStream { /** * Checks if the signature matches what is expected for a jar file * (in this case it is the same as for a zip file). - * + * * @param signature * the bytes to check * @param length http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java index 8bbe890..5e2c7a8 100644 --- a/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java @@ -30,7 +30,7 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; * Subclass that adds a special extra field to the very first entry * which allows the created archive to be used as an executable jar on * Solaris. - * + * * @NotThreadSafe */ public class JarArchiveOutputStream extends ZipArchiveOutputStream { @@ -43,7 +43,7 @@ public class JarArchiveOutputStream extends ZipArchiveOutputStream { /** * Create and instance that wraps the output stream using the provided encoding. - * + * * @param out the output stream to wrap * @param encoding the encoding to use. Use null for the platform default. * @since 1.10 http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256Decoder.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256Decoder.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256Decoder.java index c320d9f..aca9777 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256Decoder.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/AES256SHA256Decoder.java @@ -36,7 +36,7 @@ class AES256SHA256Decoder extends CoderBase { return new InputStream() { private boolean isInitialized = false; private CipherInputStream cipherInputStream = null; - + private CipherInputStream init() throws IOException { if (isInitialized) { return cipherInputStream; @@ -99,17 +99,17 @@ class AES256SHA256Decoder extends CoderBase { generalSecurityException); } } - + @Override public int read() throws IOException { return init().read(); } - + @Override public int read(final byte[] b, final int off, final int len) throws IOException { return init().read(b, off, len); } - + @Override public void close() { } http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/sevenz/Archive.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/Archive.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/Archive.java index 71288b0..dd1c75a 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/Archive.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/Archive.java @@ -46,10 +46,10 @@ class Archive { } private static String lengthOf(final long[] a) { - return a == null ? "(null)" : String.valueOf(a.length); + return a == null ? "(null)" : String.valueOf(a.length); } private static String lengthOf(final Object[] a) { - return a == null ? "(null)" : String.valueOf(a.length); + return a == null ? "(null)" : String.valueOf(a.length); } } http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java index 8caac74..c26a37f 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java @@ -66,7 +66,7 @@ public class CLI { EXTRACT("Extracting") { private final byte[] buf = new byte[8192]; @Override - public void takeAction(final SevenZFile archive, final SevenZArchiveEntry entry) + public void takeAction(final SevenZFile archive, final SevenZArchiveEntry entry) throws IOException { final File outFile = new File(entry.getName()); if (entry.isDirectory()) { @@ -111,7 +111,7 @@ public class CLI { } public abstract void takeAction(SevenZFile archive, SevenZArchiveEntry entry) throws IOException; - } + } public static void main(final String[] args) throws Exception { if (args.length == 0) { http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java index c04dca6..50ae163 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java @@ -75,7 +75,7 @@ class Coders { } return cb.decode(archiveName, is, uncompressedLength, coder, password); } - + static OutputStream addEncoder(final OutputStream out, final SevenZMethod method, final Object options) throws IOException { final CoderBase cb = findByMethod(method); @@ -89,7 +89,7 @@ class Coders { @Override InputStream decode(final String archiveName, final InputStream in, final long uncompressedLength, final Coder coder, final byte[] password) throws IOException { - return in; + return in; } @Override OutputStream encode(final OutputStream out, final Object options) { @@ -115,14 +115,14 @@ class Coders { e); } } - + @SuppressWarnings("resource") @Override OutputStream encode(final OutputStream out, final Object options) { return new FlushShieldFilterOutputStream(opts.getOutputStream(new FinishableWrapperOutputStream(out))); } } - + static class DeflateDecoder extends CoderBase { DeflateDecoder() { super(Number.class); http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6b12eab8/src/main/java/org/apache/commons/compress/archivers/sevenz/Folder.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/Folder.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/Folder.java index 6b1975a..128cba9 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/Folder.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/Folder.java @@ -70,7 +70,7 @@ class Folder { } return -1; } - + int findBindPairForOutStream(final int index) { for (int i = 0; i < bindPairs.length; i++) { if (bindPairs[i].outIndex == index) { @@ -79,7 +79,7 @@ class Folder { } return -1; } - + long getUnpackSize() { if (totalOutputStreams == 0) { return 0;