TrueZIP Driver ZIP 7.0

de.schlichtherle.truezip.fs.archive.zip
Class ReadOnlySfxDriver

java.lang.Object
  extended by de.schlichtherle.truezip.fs.FsDriver
      extended by de.schlichtherle.truezip.fs.archive.FsArchiveDriver<E>
          extended by de.schlichtherle.truezip.fs.archive.FsCharsetArchiveDriver<ZipArchiveEntry>
              extended by de.schlichtherle.truezip.fs.archive.zip.ZipDriver
                  extended by de.schlichtherle.truezip.fs.archive.zip.ReadOnlySfxDriver
All Implemented Interfaces:
EntryFactory<ZipArchiveEntry>, ZipEntryFactory<ZipArchiveEntry>
Direct Known Subclasses:
CheckedReadOnlySfxDriver

@Immutable
public class ReadOnlySfxDriver
extends ZipDriver

An archive driver which reads Self Executable (SFX/EXE) ZIP files, but doesn't support to create or update them because this would spoil the SFX code in its preamble.

Author:
Christian Schlichtherle

Field Summary
static Charset SFX_CHARSET
          The character set used in SFX archives by default, which is determined by calling System.getProperty("file.encoding").
 
Constructor Summary
ReadOnlySfxDriver(IOPoolProvider provider)
           
 
Method Summary
 boolean getPreambled()
          Returns the value of the property preambled.
protected  ZipOutputShop newZipOutputShop(FsConcurrentModel model, OutputStream out, ZipInputShop source)
           
 
Methods inherited from class de.schlichtherle.truezip.fs.archive.zip.ZipDriver
getLevel, getMethod, getPool, getPostambled, newEntry, newEntry, newEntry, newInputShop, newOutputShop, newZipInputShop
 
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, getOpenIcon, isFederated, newController
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SFX_CHARSET

public static final Charset SFX_CHARSET
The character set used in SFX archives by default, which is determined by calling System.getProperty("file.encoding").

Constructor Detail

ReadOnlySfxDriver

public ReadOnlySfxDriver(IOPoolProvider provider)
Method Detail

getPreambled

public final boolean getPreambled()
Description copied from class: ZipDriver
Returns the value of the property 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.

Overrides:
getPreambled in class ZipDriver
Returns:
The value of the property preambled.

newZipOutputShop

protected ZipOutputShop newZipOutputShop(FsConcurrentModel model,
                                         OutputStream out,
                                         ZipInputShop source)
                                  throws IOException
Overrides:
newZipOutputShop in class ZipDriver
Throws:
IOException

TrueZIP Driver ZIP 7.0

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.