|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.zip.TarFilePacker net.sf.basedb.util.zip.Bzip2FilePacker
public class Bzip2FilePacker
This class wraps the TarFilePacker
in a BZIP2 stream, creating
a tar.bz2 file.
Field Summary | |
---|---|
private org.apache.tools.bzip2.CBZip2OutputStream |
bzip
|
Constructor Summary | |
---|---|
Bzip2FilePacker()
Create a new packer that compresses files with the BZIP2 format. |
Method Summary | |
---|---|
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 . |
Methods inherited from class net.sf.basedb.util.zip.TarFilePacker |
---|
pack |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private org.apache.tools.bzip2.CBZip2OutputStream bzip
Constructor Detail |
---|
public Bzip2FilePacker()
Method Detail |
---|
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 to
IOException
- 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
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |