java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
kala.compress.archivers.ArchiveOutputStream<ZipArchiveEntry>
kala.compress.archivers.zip.ZipArchiveOutputStream
kala.compress.archivers.jar.JarArchiveOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Subclass that adds a special extra field to the very first entry which allows the created archive to be used as an executable jar on Solaris.
-
Nested Class Summary
Nested classes/interfaces inherited from class kala.compress.archivers.zip.ZipArchiveOutputStream
ZipArchiveOutputStream.UnicodeExtraFieldPolicy -
Field Summary
FieldsFields inherited from class kala.compress.archivers.zip.ZipArchiveOutputStream
def, DEFAULT_COMPRESSION, DEFLATED, finished, STOREDFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionJarArchiveOutputStream(OutputStream out, Charset encoding) Constructs a new instance that wraps the output stream using the provided encoding. -
Method Summary
Modifier and TypeMethodDescriptionvoidputArchiveEntry(ZipArchiveEntry entry) Writes the headers for an archive entry to the output stream.Methods inherited from class kala.compress.archivers.zip.ZipArchiveOutputStream
addRawArchiveEntry, canWriteEntryData, close, closeArchiveEntry, createArchiveEntry, deflate, finish, flush, getBytesWritten, getEncoding, isSeekable, setComment, setCreateUnicodeExtraFields, setEncoding, setFallbackToUTF8, setLevel, setMethod, setUseLanguageEncodingFlag, setUseZip64, write, writeCentralDirectoryEnd, writeCentralFileHeader, writeDataDescriptor, writeLocalFileHeader, writeOut, writeOut, writePreamble, writePreamble, writeZip64CentralDirectoryMethods inherited from class kala.compress.archivers.ArchiveOutputStream
checkFinished, checkOpen, count, count, isClosed, isFinished, writeMethods inherited from class java.io.FilterOutputStream
writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
jarMarkerAdded
private boolean jarMarkerAdded
-
-
Constructor Details
-
JarArchiveOutputStream
-
JarArchiveOutputStream
Constructs a new instance that wraps the output stream using the provided encoding.- Parameters:
out- the output stream to wrapencoding- the encoding to use. Use null for the UTF-8.- Since:
- 1.27.1-0
-
-
Method Details
-
putArchiveEntry
Description copied from class:ZipArchiveOutputStreamWrites the headers for an archive entry to the output stream. The caller must then write the content to the stream and callArchiveOutputStream.closeArchiveEntry()to complete the process.- Overrides:
putArchiveEntryin classZipArchiveOutputStream- Parameters:
entry- describes the entry- Throws:
IOException- if an I/O error occurs
-