@Immutable public class JarDriver extends ZipDriver
DateTimeConverter.JAR
.
This configuration makes this driver applicable for all countries.
However, it pretty much constraints 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(IOPoolProvider provider)
Constructs a new JAR file driver.
|
Modifier and Type | Method and Description |
---|---|
JarDriverEntry |
newEntry(String name)
Returns a new JAR archive entry with the given
name . |
JarDriverEntry |
newEntry(String name,
ZipEntry template)
Returns a new JAR archive entry with the given
name and all
other properties copied from the given template. |
check, decorate, getKeyManagerProvider, getKeyProviderSyncStrategy, getLevel, getMethod, getOutputSocket, getPool, getPostambled, getPreambled, getRedundantContentSupport, getRedundantMetaDataSupport, mountPointUri, newController, newEntry, newInputShop, newInputShop, newOutputShop, newOutputShop, newOutputShop, process, resourceUri, zipCryptoParameters
assertEncodable, getCharset, toString, toZipOrTarEntryName
getInputSocket, isFederated, newController, newEntry
getPriority
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOverheadSize
getCharset
public static final Charset JAR_CHARSET
"UTF-8"
.public JarDriver(IOPoolProvider provider)
JAR_CHARSET
for encoding entry names
and comments.provider
- the provider for the I/O buffer pool.public JarDriverEntry newEntry(String name)
name
.newEntry
in interface ZipEntryFactory<ZipDriverEntry>
newEntry
in class ZipDriver
name
- the entry name.new JarDriverEntry(name)
public JarDriverEntry newEntry(String name, ZipEntry template)
name
and all
other properties copied from the given template.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.