Modifier and Type | Class and Description |
---|---|
pack-priv static enum | ZipCoder.
This enum represents the three possible return values for
|
pack-priv static class |
Modifier and Type | Field and Description |
---|---|
private final Charset | |
protected CharsetDecoder | |
private CharsetEncoder | |
private static final JavaLangAccess | |
private byte[] | |
pack-priv static final ZipCoder. |
Modifier and Type | Method and Description |
---|---|
pack-priv int | |
pack-priv ZipCoder. | 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 boolean | |
private byte[] | |
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 |
enc | back to summary |
---|---|
private CharsetEncoder enc |
JLA | back to summary |
---|---|
private static final JavaLangAccess JLA |
slashBytes | back to summary |
---|---|
private byte[] slashBytes |
UTF8 | back to summary |
---|---|
pack-priv static final ZipCoder. |
ZipCoder | back to summary |
---|---|
private ZipCoder(Charset cs) |
checkedHash | back to summary |
---|---|
pack-priv int checkedHash(byte[] a, int off, int len) throws Exception |
compare | back to summary |
---|---|
pack-priv ZipCoder. 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) |
hasTrailingSlash | back to summary |
---|---|
pack-priv boolean hasTrailingSlash(byte[] a, int end) |
isUTF8 | back to summary |
---|---|
pack-priv boolean isUTF8() |
slashBytes | back to summary |
---|---|
private byte[] slashBytes() |
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) |
compare(String, byte[], int, int, boolean)
when
this method compares a lookup name to a string encoded in the
CEN byte array.
Modifier and Type | Field and Description |
---|---|
public static final ZipCoder. | DIRECTORY_MATCH
The lookup string and the encoded string differs only by the encoded string having a trailing '/' character. |
public static final ZipCoder. | EXACT_MATCH
The lookup string is exactly equal to the encoded string. |
public static final ZipCoder. | NO_MATCH
The lookup string and the encoded string do not match. |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public static ZipCoder. | |
public static ZipCoder. |
DIRECTORY_MATCH | back to summary |
---|---|
public static final ZipCoder. The lookup string and the encoded string differs only by the encoded string having a trailing '/' character. |
EXACT_MATCH | back to summary |
---|---|
public static final ZipCoder. The lookup string is exactly equal to the encoded string. |
NO_MATCH | back to summary |
---|---|
public static final ZipCoder. The lookup string and the encoded string do not match. (They are neither an exact match or a directory match.) |
Comparison | back to summary |
---|---|
private Comparison() |
valueOf | back to summary |
---|---|
public static ZipCoder. |
values | back to summary |
---|---|
public static ZipCoder. |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
pack-priv int | |
pack-priv ZipCoder. | 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 testedOverrides 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[] | |
pack-priv 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 ZipCoder. 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 |
---|---|
pack-priv boolean hasTrailingSlash(byte[] a, int end) Overrides java.
|
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.
|