Reputation: 6195
I can unzip 7z File by using org.apache.commons.compress.archivers.sevenz.SevenZFile at Java 7 and java 8. But I cant do that by using Java6. Can you please help me to fix that issue by Java 6 ? SeekableByteChannel cannot be found by Java6 :(
You can find out the sample code below :
SeekableInMemoryByteChannel inMemoryByteChannel = new
SeekableInMemoryByteChannel(targetArray);
SevenZFile sevenZFile = new SevenZFile(inMemoryByteChannel);
Upvotes: 0
Views: 359
Reputation:
Starting with Apache Commons Compress 1.13 it requires Java 7 at runtime. If you need support for Java6 version 1.12 or earlier will work (but may have less features or a different set of bugs).
In the case of 7z 1.12 and earlier only allow reading of files, not arbitrary streams. It was the move to Java7 and the chance to use SeekableByteChannel
that allowed supporting reading from more general inputs.
Upvotes: 1