public class SevenZFileGiveStream
extends java.lang.Object
The 7z file format is a flexible container that can contain many compression and encryption types, but at the moment only only Copy, LZMA2, BZIP2, and AES-256 + SHA-256 are supported, and archive header compression (when it uses the unsupported LZMA compression) isn't. So the only archives that can be read are the following:
7z a -mhc=off [-mhe=on] -mx=0 [-ppassword] archive.7z files 7z a -mhc=off [-mhe=on] -m0=LZMA2 [-ppassword] archive.7z files 7z a -mhc=off [-mhe=on] -m0=BZIP2 [-ppassword] archive.7z files
The format is very Windows/Intel specific, so it uses little-endian byte order, doesn't store user/group or permission bits, and represents times using NTFS timestamps (100 nanosecond units since 1 January 1601). Hence the official tools recommend against using it for backup purposes on *nix, and recommend .tar.7z or .tar.lzma or .tar.xz instead.
Both the header and file contents may be compressed and/or encrypted. With both encrypted, neither file names nor file contents can be read, but the use of encryption isn't plausibly deniable.
Constructor and Description |
---|
SevenZFileGiveStream(java.io.File filename) |
SevenZFileGiveStream(java.io.File filename,
java.lang.String password) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.io.InputStream |
getCurrentEntryInputStream() |
org.apache.commons.compress.archivers.sevenz.SevenZArchiveEntry |
getNextEntry() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
public SevenZFileGiveStream(java.io.File filename, java.lang.String password) throws java.io.IOException
java.io.IOException
public SevenZFileGiveStream(java.io.File filename) throws java.io.IOException
java.io.IOException
public void close()
public org.apache.commons.compress.archivers.sevenz.SevenZArchiveEntry getNextEntry() throws java.io.IOException
java.io.IOException
public java.io.InputStream getCurrentEntryInputStream()
public int read() throws java.io.IOException
java.io.IOException
public int read(byte[] b) throws java.io.IOException
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException