|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.compress.PackableObject
org.apache.commons.compress.AbstractCompressor
public abstract class AbstractCompressor
AbstractCompressor handles all compression/decompression actions on an abstract basis.
| Field Summary |
|---|
| Fields inherited from class org.apache.commons.compress.PackableObject |
|---|
CHOOSE_EXTENSION, CHOOSE_NAME |
| Constructor Summary | |
|---|---|
AbstractCompressor()
|
|
| Method Summary | |
|---|---|
InputStream |
compress(File input)
Compresses this file and returns an InputStream to the compressed File |
InputStream |
compress(InputStream input)
Compresses this InputStream and returns an InputStream to the compressed file |
void |
compressTo(File input,
File output)
Creates the file "output" with the compressed content of file "input" |
void |
compressToHere(File input)
Compresses the file input and creates a file in the same directory with the default file extension in its name. |
InputStream |
decompress(File input)
Decompresses a file and returns an InputStream |
InputStream |
decompress(InputStream input)
Decompresses a file and returns an InputStream |
void |
decompressTo(File input,
File output)
Decompresses this file and writes the decompressed byte to the output file |
abstract String |
getDefaultFileExtension()
Returns a String with the default file extension for this compressor. |
| Methods inherited from class org.apache.commons.compress.PackableObject |
|---|
getHeader, getName, identifyByHeader, isPackableWith |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.commons.compress.Compressor |
|---|
compressTo, decompressTo |
| Constructor Detail |
|---|
public AbstractCompressor()
| Method Detail |
|---|
public abstract String getDefaultFileExtension()
getDefaultFileExtension in class PackableObject
public InputStream compress(InputStream input)
throws CompressException
Compressor
compress in interface Compressorinput - Stream to compress
CompressException - if the Compressor reports an error
public void compressTo(File input,
File output)
throws CompressException
Compressor
compressTo in interface Compressorinput - the file to compressoutput - the file to create
CompressException - if the Compressor reports an error
public void compressToHere(File input)
throws CompressException
Compressor
compressToHere in interface Compressorinput - the file to compress
CompressException - if the Compressor reports an error
public InputStream compress(File input)
throws CompressException
Compressor
compress in interface Compressorinput - File to compress
CompressException - if the Compressor reports an error
public InputStream decompress(File input)
throws CompressException
Compressor
decompress in interface Compressorinput - file to decompress
CompressException
public InputStream decompress(InputStream input)
throws CompressException
Compressor
decompress in interface Compressorinput - inputstream to decompress
CompressException
public void decompressTo(File input,
File output)
throws CompressException
Compressor
decompressTo in interface Compressorinput - File to decompressoutput - File to write the decompressed bytes to
CompressException - if the Compressor reports an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||