@Immutable @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public abstract class FsCharsetArchiveDriver<E extends FsArchiveEntry> extends FsArchiveDriver<E>
Implementations must be immutable.
| Modifier and Type | Class and Description |
|---|---|
private class |
FsCharsetArchiveDriver.ThreadLocalEncoder |
| Modifier and Type | Field and Description |
|---|---|
private Charset |
charset |
private FsCharsetArchiveDriver.ThreadLocalEncoder |
encoder |
| Modifier | Constructor and Description |
|---|---|
protected |
FsCharsetArchiveDriver(Charset charset)
Constructs a new character set archive driver.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertEncodable(String name)
Ensures that the given entry name can be encoded by this driver's
character set.
|
Charset |
getCharset()
Returns the character set provided to the constructor.
|
String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
protected static String |
toZipOrTarEntryName(String name,
Entry.Type type)
Fixes the given entry name so that it forms a valid entry name
for ZIP or TAR files by ensuring that the returned entry name ends with
the separator character
'/' if and only if type is
DIRECTORY. |
getClosedIcon, getInputSocket, getOpenIcon, getOutputSocket, getPool, isFederated, newController, newEntry, newEntry, newInputShop, newInputStream, newOutputShop, newOutputStream, newReadOnlyFilegetPriorityprivate final Charset charset
private final FsCharsetArchiveDriver.ThreadLocalEncoder encoder
protected FsCharsetArchiveDriver(Charset charset)
charset - the character set to use for encoding entry names and
probably other meta data when writing an archive file.
Depending on the archive file format, this may get used for
reading an archive file, too.public Charset getCharset()
protected static String toZipOrTarEntryName(String name, Entry.Type type)
'/' if and only if type is
DIRECTORY.name - an entry name.type - an entry type.protected final void assertEncodable(String name) throws CharConversionException
FsArchiveDriver.newEntry(java.lang.String, de.schlichtherle.truezip.entry.Entry.Type, de.schlichtherle.truezip.entry.Entry).name - an entry name.CharConversionException - If the path name contains characters
which cannot get encoded.getCharset()Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.