com.myJava.file.archive.zip64
Class ZipOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.myJava.file.archive.zip64.DeflaterOutputStream
com.myJava.file.archive.zip64.ZipOutputStream
- All Implemented Interfaces:
- ZipConstants, java.io.Closeable, java.io.Flushable
public class ZipOutputStream
- extends DeflaterOutputStream
- implements ZipConstants
This class was derived from the original java.util.zip.ZipOutputStream.
The following modifications were made :
- No more control over duplicates entries
- Zip64 / Zip32 support
- Uses SerializedCollections to ensure memory capacity
- Package and name change
- Splitting management
- STORE method was removed
- Use EXT blocks to store data
- Author:
- Olivier Petrucci
CAUTION :
This file has been integrated into Areca.
It is has also possibly been adapted to meet Areca's needs. If such modifications has been made, they are described above.
Thanks to the authors for their work.
Areca Build ID : 7299034069467778562
Fields inherited from class java.io.FilterOutputStream |
out |
Fields inherited from interface com.myJava.file.archive.zip64.ZipConstants |
CENATT, CENATX, CENCOM, CENCRC, CENDSK, CENEXT, CENFLG, CENHDR, CENHOW, CENLEN, CENNAM, CENOFF, CENSIG, CENSIZ, CENTIM, CENVEM, CENVER, DEFAULT_CHARSET, ENDCOM, ENDHDR, ENDOFF, ENDSIG, ENDSIZ, ENDSUB, ENDTOT, EXTCRC, EXTHDR, EXTHDR64, EXTLEN, EXTLEN64, EXTSIG, EXTSIZ, LOCCRC, LOCEXT, LOCFLG, LOCHDR, LOCHOW, LOCLEN, LOCNAM, LOCSIG, LOCSIZ, LOCTIM, LOCVER, MAX_INT, MVSIG, SIZE_INT, SIZE_LONG, SIZE_SHORT, ZIP64ENDLENGTH, ZIP64ENDLOCSIG, ZIP64ENDSIG, ZIP64SIZEFLAG, ZIP64VERSION, ZIP64XTRAFIELD, ZIP64XTRALENGTH, ZIPVERSION |
Method Summary |
void |
close()
Writes remaining compressed data to the output stream and closes the
underlying stream. |
void |
closeEntry()
|
protected byte[] |
encode(java.lang.String s)
|
void |
finish()
Finishes writing compressed data to the output stream without closing
the underlying stream. |
java.nio.charset.Charset |
getCharset()
|
boolean |
isUseZip64()
|
void |
putNextEntry(ZipEntry e)
|
void |
setCharset(java.nio.charset.Charset charset)
|
void |
setComment(java.lang.String comment)
|
void |
setLevel(int level)
|
void |
setUseZip64(boolean useZip64)
|
void |
write(byte[] b,
int off,
int len)
Writes an array of bytes to the compressed output stream. |
Methods inherited from class java.io.FilterOutputStream |
flush, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZipOutputStream
public ZipOutputStream(java.io.OutputStream out,
boolean useZip64)
ZipOutputStream
public ZipOutputStream(VolumeStrategy strategy,
long volumeSize,
boolean useZip64)
setComment
public void setComment(java.lang.String comment)
isUseZip64
public boolean isUseZip64()
setUseZip64
public void setUseZip64(boolean useZip64)
setLevel
public void setLevel(int level)
getCharset
public java.nio.charset.Charset getCharset()
setCharset
public void setCharset(java.nio.charset.Charset charset)
putNextEntry
public void putNextEntry(ZipEntry e)
throws java.io.IOException
- Throws:
java.io.IOException
closeEntry
public void closeEntry()
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Description copied from class:
DeflaterOutputStream
- Writes an array of bytes to the compressed output stream. This
method will block until all the bytes are written.
- Overrides:
write
in class DeflaterOutputStream
- Parameters:
b
- the data to be writtenoff
- the start offset of the datalen
- the length of the data
- Throws:
java.io.IOException
- if an I/O error has occurred
finish
public void finish()
throws java.io.IOException
- Description copied from class:
DeflaterOutputStream
- Finishes writing compressed data to the output stream without closing
the underlying stream. Use this method when applying multiple filters
in succession to the same output stream.
- Overrides:
finish
in class DeflaterOutputStream
- Throws:
java.io.IOException
- if an I/O error has occurred
close
public void close()
throws java.io.IOException
- Description copied from class:
DeflaterOutputStream
- Writes remaining compressed data to the output stream and closes the
underlying stream.
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class DeflaterOutputStream
- Throws:
java.io.IOException
- if an I/O error has occurred
encode
protected byte[] encode(java.lang.String s)