You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2018/05/09 10:42:22 UTC

[2/6] commons-compress git commit: add another constructor overload without password

add another constructor overload without password


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

Branch: refs/heads/master
Commit: dc52c6b8da6cdf4f23c87c2e55c46cbdaf96d6fa
Parents: b87e8e8
Author: Stefan Bodewig <bo...@apache.org>
Authored: Mon May 7 19:49:44 2018 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Wed May 9 12:35:49 2018 +0200

----------------------------------------------------------------------
 .../compress/archivers/sevenz/SevenZFile.java      | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/dc52c6b8/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 902174c..8ce3e39 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
@@ -186,6 +186,23 @@ public class SevenZFile implements Closeable {
      * allows you to read from an in-memory archive.</p>
      *
      * @param channel the channel to read
+     * @param filename name of the archive - only used for error reporting
+     * @throws IOException if reading the archive fails
+     * @since 1.17
+     */
+    public SevenZFile(final SeekableByteChannel channel, String filename)
+        throws IOException {
+        this(channel, filename, null, false);
+    }
+
+    /**
+     * Reads a SeekableByteChannel as 7z archive
+     *
+     * <p>{@link
+     * org.apache.commons.compress.utils.SeekableInMemoryByteChannel}
+     * allows you to read from an in-memory archive.</p>
+     *
+     * @param channel the channel to read
      * @param password optional password if the archive is encrypted -
      * the byte array is supposed to be the UTF16-LE encoded
      * representation of the password.