java.io.Closeable
, java.lang.AutoCloseable
public class GZIPArchiveWriter
extends java.lang.Object
implements java.io.Closeable
Constructor | Description |
---|---|
GZIPArchiveWriter(java.io.OutputStream output) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
GZIPArchive.WriteEntry |
getEntry(java.lang.String name,
java.lang.String comment,
java.util.Date creationDate) |
Returns an object that can be used to write an entry in the GZIP archive.
|
protected void |
writeEntry(GZIPArchive.Entry entry) |
Writes the entry on the underlying stream.
|
public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
java.io.IOException
protected void writeEntry(GZIPArchive.Entry entry) throws java.io.IOException
java.io.IOException
public GZIPArchive.WriteEntry getEntry(java.lang.String name, java.lang.String comment, java.util.Date creationDate)
GZIPArchive.WriteEntry.deflater
and,
at the end, call its close()
method (to actually write the compressed content).name
- the name of the entry.comment
- the comment of the entry.creationDate
- the date in which the entry has been created.