commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [1/3] commons-compress git commit: javadocs
Date Thu, 11 May 2017 18:49:09 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master 86fbbe288 -> 0daa8708d


javadocs


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/e646770c
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/e646770c
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/e646770c

Branch: refs/heads/master
Commit: e646770cfbaf617eb9183d94ac5002f736218013
Parents: 86fbbe2
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Thu May 11 20:29:37 2017 +0200
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Thu May 11 20:29:37 2017 +0200

----------------------------------------------------------------------
 .../brotli/BrotliCompressorInputStream.java     | 43 --------------------
 .../lz4/BlockLZ4CompressorOutputStream.java     |  1 +
 .../compressors/lz77support/Parameters.java     | 19 +++++++++
 .../snappy/SnappyCompressorOutputStream.java    |  1 +
 4 files changed, 21 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e646770c/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 37b050a..135988d 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
@@ -37,80 +37,46 @@ public class BrotliCompressorInputStream extends CompressorInputStream
{
         this.decIS = new org.brotli.dec.BrotliInputStream(in);
     }
 
-    /**
-     * @return
-     * @throws IOException
-     * @see java.io.InputStream#available()
-     */
     @Override
     public int available() throws IOException {
         return decIS.available();
     }
 
-    /**
-     * @throws IOException
-     * @see org.brotli.dec.BrotliInputStream#close()
-     */
     @Override
     public void close() throws IOException {
         decIS.close();
     }
 
-    /**
-     * @return
-     * @see java.lang.Object#hashCode()
-     */
     @Override
     public int hashCode() {
         return decIS.hashCode();
     }
 
-    /** {@inheritDoc} */
     @Override
     public int read(final byte[] b) throws IOException {
         return decIS.read(b);
     }
 
-    /**
-     * @param obj
-     * @return
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
     @Override
     public boolean equals(final Object obj) {
         return decIS.equals(obj);
     }
 
-    /**
-     * @param n
-     * @return
-     * @throws IOException
-     * @see java.io.InputStream#skip(long)
-     */
     @Override
     public long skip(final long n) throws IOException {
         return decIS.skip(n);
     }
 
-    /**
-     * @param readlimit
-     * @see java.io.InputStream#mark(int)
-     */
     @Override
     public void mark(final int readlimit) {
         decIS.mark(readlimit);
     }
 
-    /**
-     * @return
-     * @see java.io.InputStream#markSupported()
-     */
     @Override
     public boolean markSupported() {
         return decIS.markSupported();
     }
 
-    /** {@inheritDoc} */
     @Override
     public int read() throws IOException {
         final int ret = decIS.read();
@@ -118,7 +84,6 @@ public class BrotliCompressorInputStream extends CompressorInputStream
{
         return ret;
     }
 
-    /** {@inheritDoc} */
     @Override
     public int read(final byte[] buf, final int off, final int len) throws IOException {
         final int ret = decIS.read(buf, off, len);
@@ -126,19 +91,11 @@ public class BrotliCompressorInputStream extends CompressorInputStream
{
         return ret;
     }
 
-    /**
-     * @return
-     * @see java.lang.Object#toString()
-     */
     @Override
     public String toString() {
         return decIS.toString();
     }
 
-    /**
-     * @throws IOException
-     * @see java.io.InputStream#reset()
-     */
     @Override
     public void reset() throws IOException {
         decIS.reset();

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e646770c/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStream.java
b/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStream.java
index 96f7a92..9330ea8 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz4/BlockLZ4CompressorOutputStream.java
@@ -401,6 +401,7 @@ public class BlockLZ4CompressorOutputStream extends CompressorOutputStream
{
 
     /**
      * Returns a builder correctly configured for the LZ4 algorithm.
+     * @return a builder correctly configured for the LZ4 algorithm
      */
     public static Parameters.Builder createParameterBuilder() {
         int maxLen = BlockLZ4CompressorInputStream.WINDOW_SIZE - 1;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e646770c/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
b/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
index 5cdbae9..d61ff65 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz77support/Parameters.java
@@ -41,6 +41,7 @@ public final class Parameters {
      * determines the maximum offset a back-reference can take. Must
      * be a power of two.
      * @throws IllegalArgumentException if windowSize is not a power of two.
+     * @return a builder configured for the given window size
      */
     public static Builder builder(int windowSize) {
         return new Builder(windowSize);
@@ -82,6 +83,7 @@ public final class Parameters {
          * but bigger lengths can be configured.
          * @throws IllegalArgumentException if <code>windowSize</code>
          * is smaller than <code>minBackReferenceLength</code>.
+         * @return the builder
          */
         public Builder withMinBackReferenceLength(int minBackReferenceLength) {
             this.minBackReferenceLength = Math.max(TRUE_MIN_BACK_REFERENCE_LENGTH, minBackReferenceLength);
@@ -107,6 +109,7 @@ public final class Parameters {
          * <code>minBackReferenceLength</code> is interpreted as
          * <code>minBackReferenceLength</code>. <code>maxBackReferenceLength</code>
          * is capped at <code>windowSize - 1</code>.
+         * @return the builder
          */
         public Builder withMaxBackReferenceLength(int maxBackReferenceLength) {
             this.maxBackReferenceLength = maxBackReferenceLength < minBackReferenceLength
? minBackReferenceLength
@@ -126,6 +129,7 @@ public final class Parameters {
          * non-positive value as well as values bigger than
          * <code>windowSize - 1</code> are interpreted as <code>windowSize
          * - 1</code>.
+         * @return the builder
          */
         public Builder withMaxOffset(int maxOffset) {
             this.maxOffset = maxOffset < 1 ? windowSize - 1 : Math.min(maxOffset, windowSize
- 1);
@@ -144,6 +148,7 @@ public final class Parameters {
          * block. Negative numbers and 0 as well as values bigger than
          * <code>windowSize</code> are interpreted as
          * <code>windowSize</code>.
+         * @return the builder
          */
         public Builder withMaxLiteralLength(int maxLiteralLength) {
             this.maxLiteralLength = maxLiteralLength < 1 ? windowSize
@@ -157,6 +162,8 @@ public final class Parameters {
          * <p>When a back-references if this size has been found, stop searching for
longer back-references.</p>
          *
          * <p>This settings can be used to tune the tradeoff between compression speed
and compression ratio.</p>
+         * @param niceLen the "nice length" of a back-reference
+         * @return the builder
          */
         public Builder withNiceBackReferenceLength(int niceLen) {
             niceBackReferenceLength = niceLen;
@@ -167,6 +174,8 @@ public final class Parameters {
          * Sets the maximum number of back-reference candidates that should be consulted.
          *
          * <p>This settings can be used to tune the tradeoff between compression speed
and compression ratio.</p>
+         * @param maxCandidates maximum number of back-reference candidates
+         * @return the builder
          */
         public Builder withMaxNumberOfCandidates(int maxCandidates) {
             this.maxCandidates = maxCandidates;
@@ -180,6 +189,8 @@ public final class Parameters {
          * try to find a longer match for the next position.</p>
          *
          * <p>Lazy matching is enabled by default and disabled when tuning for speed.</p>
+         * @param lazy whether lazy matching should be performed
+         * @return the builder
          */
         public Builder withLazyMatching(boolean lazy) {
             lazyMatches = lazy;
@@ -191,6 +202,8 @@ public final class Parameters {
          *
          * <p>Even if lazy matching is enabled it will not be performed if the length
of the back-reference found for
          * the current position is longer than this value.</p>
+         * @param threshold the threshold for lazy matching
+         * @return the builder
          */
         public Builder withLazyThreshold(int threshold) {
             lazyThreshold = threshold;
@@ -202,6 +215,7 @@ public final class Parameters {
          * compression speed at the cost of compression ratio.
          *
          * <p>Use this method after configuring "maximum back-reference length".</p>
+         * @return the builder
          */
         public Builder tunedForSpeed() {
             niceBackReferenceLength = Math.max(minBackReferenceLength, maxBackReferenceLength
/ 8);
@@ -216,6 +230,7 @@ public final class Parameters {
          * compression ratio at the cost of compression speed.
          *
          * <p>Use this method after configuring "maximum back-reference length".</p>
+         * @return the builder
          */
         public Builder tunedForCompressionRatio() {
             niceBackReferenceLength = lazyThreshold = maxBackReferenceLength;
@@ -298,6 +313,7 @@ public final class Parameters {
 
     /**
      * Gets the length of a back-reference that is considered nice enough to stop searching
for longer ones.
+     * @return the length of a back-reference that is considered nice enough to stop searching
      */
     public int getNiceBackReferenceLength() {
         return niceBackReferenceLength;
@@ -305,6 +321,7 @@ public final class Parameters {
 
     /**
      * Gets the maximum number of back-reference candidates to consider.
+     * @return the maximum number of back-reference candidates to consider
      */
     public int getMaxCandidates() {
         return maxCandidates;
@@ -312,6 +329,7 @@ public final class Parameters {
 
     /**
      * Gets whether to perform lazy matching.
+     * @return whether to perform lazy matching
      */
     public boolean getLazyMatching() {
         return lazyMatching;
@@ -319,6 +337,7 @@ public final class Parameters {
 
     /**
      * Gets the threshold for lazy matching.
+     * @return the threshold for lazy matching
      */
     public int getLazyMatchingThreshold() {
         return lazyThreshold;

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/e646770c/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorOutputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorOutputStream.java
b/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorOutputStream.java
index 5d24d37..5705bec 100644
--- a/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorOutputStream.java
+++ b/src/main/java/org/apache/commons/compress/compressors/snappy/SnappyCompressorOutputStream.java
@@ -266,6 +266,7 @@ public class SnappyCompressorOutputStream extends CompressorOutputStream
{
     /**
      * Returns a builder correctly configured for the Snappy algorithm using the gven block
size.
      * @param blockSize the block size.
+     * @return a builder correctly configured for the Snappy algorithm using the gven block
size
      */
     public static Parameters.Builder createParameterBuilder(int blockSize) {
         // the max offset and max literal length defined by the format


Mime
View raw message