TrueZIP Driver ZIP 7.0

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

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.JarDriver
All Implemented Interfaces:
EntryFactory<ZipArchiveEntry>, ZipEntryFactory<ZipArchiveEntry>
Direct Known Subclasses:
CheckedJarDriver, OdfDriver

@Immutable
@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public class JarDriver
extends ZipDriver

An archive driver which builds JAR files. JAR files use "UTF-8" as the character set for entry names and comments.

Other than this, JAR files are treated like regular ZIP files. In particular, this class does not check a JAR file for the existance of the META-INF/MANIFEST.MF entry or any other entry.

Author:
Christian Schlichtherle

Field Summary
static Charset JAR_CHARSET
          The default character set for entry names and comments, which is "UTF-8".
 
Constructor Summary
JarDriver(IOPoolProvider provider)
           
 
Method Summary
 JarArchiveEntry newEntry(String name)
          Returns a new ZIP entry with the given name.
 JarArchiveEntry newEntry(String path, Entry.Type type, Entry template)
           
 JarArchiveEntry newEntry(String name, ZipArchiveEntry template)
           
 
Methods inherited from class de.schlichtherle.truezip.fs.archive.zip.ZipDriver
getLevel, getMethod, getPool, getPostambled, getPreambled, newInputShop, newOutputShop, newZipInputShop, newZipOutputShop
 
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

JAR_CHARSET

public static final Charset JAR_CHARSET
The default character set for entry names and comments, which is "UTF-8".

Constructor Detail

JarDriver

public JarDriver(IOPoolProvider provider)
Method Detail

newEntry

public JarArchiveEntry newEntry(String path,
                                Entry.Type type,
                                @CheckForNull
                                Entry template)
                         throws CharConversionException
Specified by:
newEntry in interface EntryFactory<ZipArchiveEntry>
Overrides:
newEntry in class ZipDriver
Throws:
CharConversionException

newEntry

public JarArchiveEntry newEntry(String name)
Description copied from interface: ZipEntryFactory
Returns a new ZIP entry with the given name.

Specified by:
newEntry in interface ZipEntryFactory<ZipArchiveEntry>
Overrides:
newEntry in class ZipDriver
Parameters:
name - the entry name - null is not permitted.
Returns:
A new ZIP entry with the given name.

newEntry

public JarArchiveEntry newEntry(String name,
                                ZipArchiveEntry template)
Overrides:
newEntry in class ZipDriver

TrueZIP Driver ZIP 7.0

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