@Immutable public class ReadOnlySfxDriver extends ZipDriver
Subclasses must be thread-safe and should be immutable!
Modifier and Type | Field and Description |
---|---|
static Charset |
SFX_CHARSET
The character set for entry names and comments, which is the default
character set.
|
ZIP_CHARSET
Constructor and Description |
---|
ReadOnlySfxDriver() |
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.
|
boolean |
getPreambled()
Returns the flag for supporting preambles.
|
net.java.truecommons.cio.OutputService<ZipDriverEntry> |
newOutput(FsModel model,
net.java.truecommons.shed.BitField<FsAccessOption> options,
FsController controller,
FsNodeName name,
net.java.truecommons.cio.InputService<ZipDriverEntry> input)
This method gets called by an archive controller in order to create a
new output service for its target archive file.
|
check, decorate, fileSystemUri, getKeyManagerMap, getLevel, getMethod, getOverheadSize, getPool, getPostambled, getRedundantContentSupport, getRedundantMetaDataSupport, mountPointUri, newEntry, newInput, newOutput, newZipInput, rdc, sink, zipCryptoParameters
checkEncodable, isArchiveDriver, newController, newEntry, newInput, normalize, source, toString
public static final Charset SFX_CHARSET
public Charset getCharset()
This is an immutable property - multiple calls must return the same object.
getCharset
in interface ZipCharsetParameters
getCharset
in class ZipDriver
SFX_CHARSET
.public final boolean getPreambled()
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.
If this method returns false
, then a ZIP file must start with
either a Local File Header (LFH) signature,
a ZIP64 End Of Central Directory Record (EOCDR) signature or an End Of
Central Directory Record (EOCDR) signature.
The implementation in the class ZipDriver
returns false
.
The implementation in the class ZipDriver
returns true
.
getPreambled
in interface ZipFileParameters<ZipDriverEntry>
getPreambled
in class AbstractZipDriver<ZipDriverEntry>
true
public final net.java.truecommons.cio.OutputService<ZipDriverEntry> newOutput(FsModel model, net.java.truecommons.shed.BitField<FsAccessOption> options, FsController controller, FsNodeName name, @CheckForNull @WillNotClose net.java.truecommons.cio.InputService<ZipDriverEntry> input) throws IOException
FsArchiveDriver
The implementation in FsArchiveDriver
simply forwards the call
to FsArchiveDriver.sink(net.java.truecommons.shed.BitField<net.java.truevfs.kernel.spec.FsAccessOption>, net.java.truevfs.kernel.spec.FsController, net.java.truevfs.kernel.spec.FsNodeName)
and FsArchiveDriver.newOutput(FsModel, FsOutputSocketSink, InputService)
.
newOutput
in class FsArchiveDriver<ZipDriverEntry>
model
- the file system model for the target archive file.options
- the options for accessing the target archive file in the
parent file system.controller
- the controller for the parent file system with the
target archive file.name
- the node name of the target archive file in the parent
file system.input
- the nullable InputService
for the target archive
file.
If not null
, then the target archive file is going to
get updated.
This parameter is guaranteed to be the product of this driver's
factory method
FsArchiveDriver.newInput(FsModel, BitField, FsController, FsNodeName)
.IOException
- on any I/O error.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.