|
TrueZIP Driver ZIP 7.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.fs.FsDriver
de.schlichtherle.truezip.fs.archive.FsArchiveDriver<E>
de.schlichtherle.truezip.fs.archive.FsCharsetArchiveDriver<ZipArchiveEntry>
de.schlichtherle.truezip.fs.archive.zip.ZipDriver
@Immutable @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public class ZipDriver
An archive driver which builds ZIP files.
Do not use this driver for custom application file formats
- use JarDriver instead!
This driver does not check the CRC value of any entries in existing
archives
- use CheckedZipDriver instead!
CheckedZipDriver| Field Summary | |
|---|---|
private IOPool<?> |
pool
|
private static Charset |
ZIP_CHARSET
The default character set for entry names and comments, which is "IBM437". |
| Fields inherited from class de.schlichtherle.truezip.fs.archive.FsArchiveDriver |
|---|
NO_INPUT_OPTION, NO_OUTPUT_OPTION |
| Constructor Summary | |
|---|---|
|
ZipDriver(IOPoolProvider service)
Equivalent to new ZipDriver(pool, ZIP_CHARSET). |
protected |
ZipDriver(IOPoolProvider provider,
Charset charset)
Constructs a new ZIP driver. |
| Methods inherited from class de.schlichtherle.truezip.fs.archive.FsCharsetArchiveDriver |
|---|
assertEncodable, getCharset, toString, toZipOrTarEntryName |
| Methods inherited from class de.schlichtherle.truezip.fs.archive.FsArchiveDriver |
|---|
getClosedIcon, getInputSocket, getOpenIcon, isFederated, newController, newEntry |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final Charset ZIP_CHARSET
"IBM437".
private final IOPool<?> pool
| Constructor Detail |
|---|
public ZipDriver(IOPoolProvider service)
new ZipDriver(pool, ZIP_CHARSET).
protected ZipDriver(IOPoolProvider provider,
Charset charset)
provider - the I/O pool service to use for allocating temporary I/O
entries.charset - the character set to use for entry names and comments.| Method Detail |
|---|
protected final IOPool<?> getPool()
getPool in class FsArchiveDriver<ZipArchiveEntry>public boolean getPreambled()
preambled.
If this is true, then a ZIP file is allowed to contain arbitrary
data as its preamble before the actual ZIP file data.
Self Extracting Archives typically use a preamble to store the
application code that is required to extract the ZIP file contents.
Note that searching for a preamble can seriously degrade the performance if the file is not compatible to the ZIP File Format Specification.
The implementation in the class ZipDriver returns false.
preambled.public boolean getPostambled()
postambled.
If this is true, then a ZIP file is allowed to contain arbitrary
length data as its postamble after the actual ZIP file data.
If this is false, then a ZIP file may still have a postamble.
However, the postamble must not exceed 64KB size, including the End Of
Central Directory record and thus the ZIP file comment.
This causes the initial ZIP file compatibility test to fail fast if the
file is not compatible to the ZIP File Format Specification.
Note that searching for an arbitrary length postamble can seriously
degrade the performance if the file is not compatible to the ZIP File
Format Specification.
So this should be set to true only if Self Extracting Archives
with very large postambles need to get supported.
The implementation in the class ZipDriver returns false.
postambled.public int getMethod()
method.
This is the compression method to use when writing an entry to a ZIP
output stream.
The implementation in the class ZipDriver returns
ZipEntry.DEFLATED.
method.public int getLevel()
level.
This is the compression level to use when deflating an entry to a ZIP
output stream.
The implementation in the class ZipDriver returns
Deflater.BEST_COMPRESSION.
level.
public OutputSocket<?> getOutputSocket(FsController<?> controller,
FsEntryName name,
BitField<FsOutputOption> options,
@CheckForNull
Entry template)
FsOutputOption.STORE in options before
forwarding the call to controller.
getOutputSocket in class FsArchiveDriver<ZipArchiveEntry>
public ZipArchiveEntry newEntry(String name,
Entry.Type type,
Entry template,
BitField<FsOutputOption> mknod)
throws CharConversionException
newEntry in class FsArchiveDriver<ZipArchiveEntry>CharConversionExceptionpublic ZipArchiveEntry newEntry(String name)
ZipEntryFactoryname.
newEntry in interface ZipEntryFactory<ZipArchiveEntry>name - the entry name - null is not permitted.
name.
public ZipArchiveEntry newEntry(String name,
ZipArchiveEntry template)
public ZipInputShop newInputShop(FsModel model,
InputSocket<?> input)
throws IOException
The implementation in the class ZipDriver acquires a read only
file from the given socket and forwards the call to
newZipInputShop(de.schlichtherle.truezip.fs.FsModel, de.schlichtherle.truezip.rof.ReadOnlyFile).
newInputShop in class FsArchiveDriver<ZipArchiveEntry>IOException
protected ZipInputShop newZipInputShop(FsModel model,
ReadOnlyFile rof)
throws IOException
IOException
public OutputShop<ZipArchiveEntry> newOutputShop(FsModel model,
OutputSocket<?> output,
@CheckForNull
InputShop<ZipArchiveEntry> source)
throws IOException
The implementation in ZipDriver simply forwards the call to
newZipOutputShop(de.schlichtherle.truezip.fs.FsModel, java.io.OutputStream, de.schlichtherle.truezip.fs.archive.zip.ZipInputShop) and wraps the result in a new
FsMultiplexedArchiveOutputShop.
newOutputShop in class FsArchiveDriver<ZipArchiveEntry>IOException
protected ZipOutputShop newZipOutputShop(FsModel model,
OutputStream out,
@CheckForNull
ZipInputShop source)
throws IOException
IOException
|
TrueZIP Driver ZIP 7.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||