public class GzipFilePacker extends TarFilePacker
TarFilePacker
in a GZIP stream, creating
a tar.gz file.Modifier and Type | Field and Description |
---|---|
private java.util.zip.GZIPOutputStream |
gzip |
Constructor and Description |
---|
GzipFilePacker()
Create a new packer that compresses files with the gzip format.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Finish the GZIP stream.
|
java.lang.String |
getDescription()
Get a short description of this file format that is suitable for display in
selection list boxes.
|
java.lang.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! |
java.lang.String |
getMimeType()
Gets the MIME type to give compressed files from this packer
|
void |
setOutputStream(java.io.OutputStream out)
Wrap the output stream in a
GZIPOutputStream . |
pack
public GzipFilePacker()
public java.lang.String getDescription()
FilePacker
getDescription
in interface FilePacker
getDescription
in class TarFilePacker
public java.lang.String getFileExtension()
FilePacker
zip
or tar.gz
Don't include the first
dot!getFileExtension
in interface FilePacker
getFileExtension
in class TarFilePacker
public java.lang.String getMimeType()
FilePacker
getMimeType
in interface FilePacker
getMimeType
in class TarFilePacker
public void setOutputStream(java.io.OutputStream out) throws java.io.IOException
GZIPOutputStream
.setOutputStream
in interface FilePacker
setOutputStream
in class TarFilePacker
out
- The output stream to write tojava.io.IOException
- If there is an error setting the output streampublic void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
close
in interface FilePacker
close
in class TarFilePacker
java.io.IOException
- If there are any errors