@Immutable public class JarDriver extends AbstractZipDriver<JarDriverEntry>
DateTimeConverter.JAR
.
This configuration makes this driver applicable for all countries.
However, it pretty much constrains the interoperability of this driver to
Java applications and Info-ZIP.
Therefore, while you should not use this driver to access plain old
ZIP files, you should definitely use it for custom application file formats
Other than this, JAR files are treated like plain old ZIP files.
In particular, this class does not check or ensure a certain
directory structure or the existance of certain entries (e.g.
META-INF/MANIFEST.MF
) within a JAR file.
This driver does not check the CRC value of any entries in existing
archives - use CheckedJarDriver
instead.
Sub-classes must be thread-safe and should be immutable!
Modifier and Type | Field and Description |
---|---|
static Charset |
JAR_CHARSET
The character set for entry names and comments in JAR files, which is
"UTF-8" . |
Constructor and Description |
---|
JarDriver() |
Modifier and Type | Method and Description |
---|---|
Charset |
getCharset()
Returns the character set to use for encoding character based meta data
such as entry names or file comments to binary data when writing
an archive file.
|
JarDriverEntry |
newEntry(String name)
Returns a new ZIP driver entry with the given
name . |
JarDriverEntry |
newEntry(String name,
ZipEntry template)
Returns a new ZIP driver entry with the given
name and all
other properties copied from the given template. |
check, decorate, fileSystemUri, getKeyManagerMap, getLevel, getMethod, getOverheadSize, getPool, getPostambled, getPreambled, getRedundantContentSupport, getRedundantMetaDataSupport, mountPointUri, newEntry, newInput, newOutput, newZipInput, rdc, sink, zipCryptoParameters
checkEncodable, isArchiveDriver, newController, newEntry, newInput, newOutput, normalize, source, toString
public static final Charset JAR_CHARSET
"UTF-8"
.public Charset getCharset()
This is an immutable property - multiple calls must return the same object.
getCharset
in interface ZipCharsetParameters
getCharset
in class FsArchiveDriver<JarDriverEntry>
JAR_CHARSET
.public JarDriverEntry newEntry(String name)
AbstractZipDriver
name
.newEntry
in interface ZipEntryFactory<JarDriverEntry>
newEntry
in class AbstractZipDriver<JarDriverEntry>
name
- the entry name.public JarDriverEntry newEntry(String name, ZipEntry template)
AbstractZipDriver
name
and all
other properties copied from the given template.newEntry
in class AbstractZipDriver<JarDriverEntry>
name
- the entry name.template
- the template entry.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.