public class Bzip2FilePacker extends TarFilePacker
TarFilePacker
in a BZIP2 stream, creating
a tar.bz2 file.Modifier and Type | Field and Description |
---|---|
private org.apache.tools.bzip2.CBZip2OutputStream |
bzip |
Constructor and Description |
---|
Bzip2FilePacker()
Create a new packer that compresses files with the BZIP2 format.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Finish the BZIP stream.
|
String |
getDescription()
Get a short description of this file format that is suitable for display in
selection list boxes.
|
String |
getFileExtension()
Gets the extension that files, packed with this tool, should have,
for example,
zip or tar.gz Don't include the first
dot! |
String |
getMimeType()
Gets the MIME type to give compressed files from this packer
|
void |
setOutputStream(OutputStream out)
Wrap the output stream in a
GZIPOutputStream . |
pack
public Bzip2FilePacker()
public String getDescription()
FilePacker
getDescription
in interface FilePacker
getDescription
in class TarFilePacker
public String getFileExtension()
FilePacker
zip
or tar.gz
Don't include the first
dot!getFileExtension
in interface FilePacker
getFileExtension
in class TarFilePacker
public String getMimeType()
FilePacker
getMimeType
in interface FilePacker
getMimeType
in class TarFilePacker
public void setOutputStream(OutputStream out) throws IOException
GZIPOutputStream
.setOutputStream
in interface FilePacker
setOutputStream
in class TarFilePacker
out
- The output stream to write toIOException
- If there is an error setting the output streampublic void close() throws IOException
close
in interface FilePacker
close
in class TarFilePacker
IOException
- If there are any errors