Class JarArchiveOutputStream
java.lang.Object
java.io.OutputStream
org.apache.commons.compress.archivers.ArchiveOutputStream
org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream
org.apache.commons.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 org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream
ZipArchiveOutputStream.UnicodeExtraFieldPolicy -
Field Summary
Fields inherited from class org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream
DEFAULT_COMPRESSION, DEFLATED, EFS_FLAG, STORED -
Constructor Summary
ConstructorsConstructorDescriptionJarArchiveOutputStream(OutputStream out, String encoding) Create and instance that wraps the output stream using the provided encoding. -
Method Summary
Modifier and TypeMethodDescriptionvoidWrites the headers for an archive entry to the output stream.Methods inherited from class org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream
addRawArchiveEntry, canWriteEntryData, close, closeArchiveEntry, createArchiveEntry, createArchiveEntry, finish, flush, getBytesWritten, getEncoding, isSeekable, setComment, setCreateUnicodeExtraFields, setEncoding, setFallbackToUTF8, setLevel, setMethod, setUseLanguageEncodingFlag, setUseZip64, write, writePreamble, writePreambleMethods inherited from class org.apache.commons.compress.archivers.ArchiveOutputStream
getCount, writeMethods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
JarArchiveOutputStream
-
JarArchiveOutputStream
Create and 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 platform default.- Since:
- 1.10
-
-
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:
ze- describes the entry- Throws:
IOException- if an I/O error occurs
-