The ZipCoder for UTF-8 charset is thread safe, ZipCoder
for other charsets require external synchronization.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Charset | |
| protected CharsetDecoder | |
| pack-priv static final byte | DIRECTORY_MATCH
Constants representing the three possible return values for
|
| private CharsetEncoder | |
| pack-priv static final byte | EXACT_MATCH
Constants representing the three possible return values for
|
| private static final JavaLangAccess | |
| pack-priv static final byte | NO_MATCH
Constants representing the three possible return values for
|
| pack-priv static final ZipCoder. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final Charset | |
| pack-priv int | |
| pack-priv byte | compare(String
The lookup string to compare with the encoded string. str, byte[] The byte array holding the encoded string b, int The offset into the array where the encoded string starts off, int The length of the encoded string in bytes len, boolean If matchDirectory)true and the strings do not match exactly,
a directory match will also be testedThis method is used by ZipFile.Source.getEntryPos when comparing the name being looked up to candidate names encoded in the CEN byte array. |
| protected CharsetDecoder | |
| private CharsetEncoder | |
| public static ZipCoder | |
| pack-priv byte[] | |
| pack-priv static int | |
| pack-priv boolean | |
| pack-priv String | |
| pack-priv String | |
| pack-priv String | |
| pack-priv static String |
| cs | back to summary |
|---|---|
| private final Charset cs | |
| dec | back to summary |
|---|---|
| protected CharsetDecoder dec | |
| DIRECTORY_MATCH | back to summary |
|---|---|
| pack-priv static final byte DIRECTORY_MATCH Constants representing the three possible return values for
| |
| enc | back to summary |
|---|---|
| private CharsetEncoder enc | |
| EXACT_MATCH | back to summary |
|---|---|
| pack-priv static final byte EXACT_MATCH Constants representing the three possible return values for
| |
| JLA | back to summary |
|---|---|
| private static final JavaLangAccess JLA | |
| NO_MATCH | back to summary |
|---|---|
| pack-priv static final byte NO_MATCH Constants representing the three possible return values for
| |
| UTF8 | back to summary |
|---|---|
| pack-priv static final ZipCoder. | |
| ZipCoder | back to summary |
|---|---|
| private ZipCoder(Charset cs) | |
| charset | back to summary |
|---|---|
| pack-priv final Charset charset() Returns the | |
| checkedHash | back to summary |
|---|---|
| pack-priv int checkedHash(byte[] a, int off, int len) throws Exception | |
| compare | back to summary |
|---|---|
| pack-priv byte compare(String str, byte[] b, int off, int len, boolean matchDirectory) This method is used by ZipFile.Source.getEntryPos when comparing the
name being looked up to candidate names encoded in the CEN byte
array.
Since ZipCode.getEntry supports looking up a "dir/" entry by
the name "dir", this method can optionally distinguish an
exact match from a partial "directory match" (where names only
differ by the encoded name having an additional trailing '/')
The return values of this method are as follows:
If the lookup name is exactly equal to the encoded string, return
| |
| decoder | back to summary |
|---|---|
| protected CharsetDecoder decoder() | |
| encoder | back to summary |
|---|---|
| private CharsetEncoder encoder() | |
| get | back to summary |
|---|---|
| public static ZipCoder get(Charset charset) | |
| getBytes | back to summary |
|---|---|
| pack-priv byte[] getBytes(String s) | |
| hash | back to summary |
|---|---|
| pack-priv static int hash(String name) | |
| isUTF8 | back to summary |
|---|---|
| pack-priv boolean isUTF8() | |
| toString | back to summary |
|---|---|
| pack-priv String toString(byte[] ba, int off, int length) | |
| toString | back to summary |
|---|---|
| pack-priv String toString(byte[] ba, int length) | |
| toString | back to summary |
|---|---|
| pack-priv String toString(byte[] ba) | |
| toStringUTF8 | back to summary |
|---|---|
| pack-priv static String toStringUTF8(byte[] ba, int len) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | |
| pack-priv byte | compare(String str, byte[] b, int off, int len, boolean matchDirectory)
Overrides java. This method is used by ZipFile.Source.getEntryPos when comparing the name being looked up to candidate names encoded in the CEN byte array. |
| pack-priv byte[] | |
| private boolean | |
| pack-priv boolean | |
| pack-priv String |
| UTF8ZipCoder | back to summary |
|---|---|
| private UTF8ZipCoder(Charset utf8) | |
| checkedHash | back to summary |
|---|---|
| pack-priv int checkedHash(byte[] a, int off, int len) throws Exception Overrides java.
| |
| compare | back to summary |
|---|---|
| pack-priv byte compare(String str, byte[] b, int off, int len, boolean matchDirectory) Overrides java. Doc from java. This method is used by ZipFile.Source.getEntryPos when comparing the
name being looked up to candidate names encoded in the CEN byte
array.
Since ZipCode.getEntry supports looking up a "dir/" entry by
the name "dir", this method can optionally distinguish an
exact match from a partial "directory match" (where names only
differ by the encoded name having an additional trailing '/')
The return values of this method are as follows:
If the lookup name is exactly equal to the encoded string, return
| |
| getBytes | back to summary |
|---|---|
| pack-priv byte[] getBytes(String s) Overrides java.
| |
| hasTrailingSlash | back to summary |
|---|---|
| private boolean hasTrailingSlash(byte[] a, int end) | |
| isUTF8 | back to summary |
|---|---|
| pack-priv boolean isUTF8() Overrides java.
| |
| toString | back to summary |
|---|---|
| pack-priv String toString(byte[] ba, int off, int length) Overrides java.
| |