You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/05/05 17:19:09 UTC

[commons-compress] 03/05: Sort members.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit 66b946e73f0099cdfd410cc7a360be7367ce9596
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 5 09:26:17 2022 -0400

    Sort members.
---
 .../utils/ChecksumVerifyingInputStream.java        | 26 +++++++++++-----------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStream.java b/src/main/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStream.java
index cce434a0..89eee317 100644
--- a/src/main/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStream.java
+++ b/src/main/java/org/apache/commons/compress/utils/ChecksumVerifyingInputStream.java
@@ -49,6 +49,19 @@ public class ChecksumVerifyingInputStream extends InputStream {
         this.bytesRemaining = size;
     }
 
+    @Override
+    public void close() throws IOException {
+        in.close();
+    }
+
+    /**
+     * @return bytes remaining to read
+     * @since 1.21
+     */
+    public long getBytesRemaining() {
+        return bytesRemaining;
+    }
+
     /**
      * Reads a single byte from the stream
      * @throws IOException if the underlying stream throws or the
@@ -109,17 +122,4 @@ public class ChecksumVerifyingInputStream extends InputStream {
         // Can't really skip, we have to hash everything to verify the checksum
         return read() >= 0 ? 1 : 0;
     }
-
-    @Override
-    public void close() throws IOException {
-        in.close();
-    }
-
-    /**
-     * @return bytes remaining to read
-     * @since 1.21
-     */
-    public long getBytesRemaining() {
-        return bytesRemaining;
-    }
 }