Java org.apache.commons.compress.archivers.zip ZipArchiveOutputStream fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.compress.archivers.zip ZipArchiveOutputStream fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.compress.archivers.zip ZipArchiveOutputStream.

The text is from its open source code.

Field

intDEFLATED
Compression method for deflated entries.
intSTORED
Compression method for stored entries.

Constructor

ZipArchiveOutputStream(OutputStream out)
Creates a new ZIP OutputStream filtering the underlying stream.
ZipArchiveOutputStream(File file)
Creates a new ZIP OutputStream writing to a File.

Method

voidclose()
Closes this output stream and releases any system resources associated with the stream.
voidcloseArchiveEntry()
Writes all necessary data for this entry.
ArchiveEntrycreateArchiveEntry(File inputFile, String entryName)
Creates a new zip entry taking some information from the given file and using the provided name.
voidfinish()
voidflush()
Flushes this output stream and forces any buffered output bytes to be written out to the stream.
longgetBytesWritten()
Returns the current number of bytes written to this stream.
StringgetEncoding()
The encoding to use for filenames and the file comment.
voidputArchiveEntry(ArchiveEntry archiveEntry)
voidsetComment(String comment)
Set the file comment.
voidsetCreateUnicodeExtraFields(UnicodeExtraFieldPolicy b)
Whether to create Unicode Extra Fields.
voidsetEncoding(final String encoding)
The encoding to use for filenames and the file comment.
voidsetFallbackToUTF8(boolean b)
Whether to fall back to UTF and the language encoding flag if the file name cannot be encoded using the specified encoding.
voidsetLevel(int level)
Sets the compression level for subsequent entries.
voidsetMethod(int method)
Sets the default compression method for subsequent entries.
voidsetUseLanguageEncodingFlag(boolean b)
Whether to set the language encoding flag if the file name encoding is UTF-8.
voidwrite(byte[] b, int offset, int length)
Writes bytes to ZIP entry.
voidwrite(int b)
Writes a byte to the current archive entry.