| Modifier and Type | Class and Description |
|---|---|
| private class | Validator.
Validate base on entries in CEN and LOC. |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private Set | |
| private static final Pattern | INVALID_ZIP_ENTRY_NAME_PATTERN
Regex expression to verify that the Zip Entry file name: - is not an absolute path - the file name is not '.' or '..' - does not contain a backslash, '\' - does not contain a drive letter - path element does not include '.' or '..' |
| private boolean | |
| private final Main | |
| private ModuleDescriptor | |
| private String | |
| private final ZipFile | |
| private final ZipInputStream |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | checkAutomaticModuleName()
Checks whether an Automatic-Module-Name entry is valid and also verifies it to the name given by a compiled module descriptor. |
| private boolean | |
| private void | |
| private boolean | |
| private static String | |
| private void | |
| private void | |
| private FingerPrint | |
| private boolean | |
| private static boolean | |
| public static boolean | Returns: true if a valid Zip Entry file name; false otherwiseZIP entry name entryName)Validate that the CEN/LOC file name header field adheres to PKWARE APPNOTE-6.3.3.TXT: 4.4.17.1 The name of the file, with optional relative path. |
| private FingerPrint | |
| pack-priv static boolean | |
| private boolean | |
| public void | |
| public void | |
| private void |
| classes | back to summary |
|---|---|
| private final Map<String, FingerPrint> classes | |
| concealedPkgs | back to summary |
|---|---|
| private Set<String> concealedPkgs | |
| INVALID_ZIP_ENTRY_NAME_PATTERN | back to summary |
|---|---|
| private static final Pattern INVALID_ZIP_ENTRY_NAME_PATTERN Regex expression to verify that the Zip Entry file name: - is not an absolute path - the file name is not '.' or '..' - does not contain a backslash, '\' - does not contain a drive letter - path element does not include '.' or '..' | |
| isValid | back to summary |
|---|---|
| private boolean isValid | |
| main | back to summary |
|---|---|
| private final Main main | |
| md | back to summary |
|---|---|
| private ModuleDescriptor md | |
| mdName | back to summary |
|---|---|
| private String mdName | |
| zf | back to summary |
|---|---|
| private final ZipFile zf | |
| zis | back to summary |
|---|---|
| private final ZipInputStream zis | |
| Validator | back to summary |
|---|---|
| private Validator(Main main, ZipFile zf, ZipInputStream zis) | |
| checkAutomaticModuleName | back to summary |
|---|---|
| private void checkAutomaticModuleName() Checks whether an Automatic-Module-Name entry is valid and also verifies it to the name given by a compiled module descriptor. | |
| checkClassName | back to summary |
|---|---|
| private boolean checkClassName(FingerPrint fp) | |
| checkModuleDescriptor | back to summary |
|---|---|
| private void checkModuleDescriptor(String miName) | |
| checkNestedClass | back to summary |
|---|---|
| private boolean checkNestedClass(FingerPrint fp, Map<String, FingerPrint> outerClasses) | |
| className | back to summary |
|---|---|
| private static String className(String entryName) | |
| error | back to summary |
|---|---|
| private void error(String msg) | |
| errorAndInvalid | back to summary |
|---|---|
| private void errorAndInvalid(String msg) | |
| getFingerPrint | back to summary |
|---|---|
| private FingerPrint getFingerPrint(ZipEntry ze) | |
| isConcealed | back to summary |
|---|---|
| private boolean isConcealed(String className) | |
| isPlatformModule | back to summary |
|---|---|
| private static boolean isPlatformModule(String name) | |
| isZipEntryNameValid | back to summary |
|---|---|
| public static boolean isZipEntryNameValid(String entryName) Validate that the CEN/LOC file name header field adheres to PKWARE APPNOTE-6.3.3.TXT: 4.4.17.1 The name of the file, with optional relative path. The path stored MUST not contain a drive or device letter, or a leading slash. All slashes MUST be forward slashes '/' as opposed to backwards slashes '\' for compatibility with Amiga and UNIX file systems etc. Also validate that the file name is not "." or "..", and that any name element is not equal to "." or ".."
| |
| sameNameFingerPrint | back to summary |
|---|---|
| private FingerPrint sameNameFingerPrint(FingerPrint fp1, FingerPrint fp2) | |
| validate | back to summary |
|---|---|
| pack-priv static boolean validate(Main main, File zipFile) throws IOException | |
| validate | back to summary |
|---|---|
| private boolean validate() | |
| validateBase | back to summary |
|---|---|
| public void validateBase(Map<String, FingerPrint> fps) | |
| validateVersioned | back to summary |
|---|---|
| public void validateVersioned(Map<String, FingerPrint> fps) | |
| warn | back to summary |
|---|---|
| private void warn(String msg) | |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static record | Validator.
A record to keep the encounter order in the directory and count of the appearances |
| pack-priv static record | Validator.
Information used for validation for a entry in CEN and LOC. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv LinkedHashMap | entries
Ordered deduplication set for entries |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv static final Validator. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addLocEntry(ZipEntry locEntry)
Record an entry apperance in LOC We compare entry order based on the CEN. |
| private void | |
| public void | |
| private void | validateEntry(String entryName, Validator.
Validation per entry observed. |
| cenEncounterOrder | back to summary |
|---|---|
| pack-priv int cenEncounterOrder | |
| entries | back to summary |
|---|---|
| pack-priv LinkedHashMap<String, Validator. Ordered deduplication set for entries | |
| locEncounterOrder | back to summary |
|---|---|
| pack-priv int locEncounterOrder | |
| outOfOrder | back to summary |
|---|---|
| pack-priv boolean outOfOrder | |
| PLACE_HOLDER | back to summary |
|---|---|
| pack-priv static final Validator. | |
| EntryValidator | back to summary |
|---|---|
| private EntryValidator() | |
| addCenEntry | back to summary |
|---|---|
| public void addCenEntry(ZipEntry cenEntry) Record an entry apperance in CEN | |
| addLocEntry | back to summary |
|---|---|
| public void addLocEntry(ZipEntry locEntry) Record an entry apperance in LOC We compare entry order based on the CEN. Thus do not increase LOC encounter order if the entry is only in LOC. Note This works because all CEN entries are added before adding LOC entries. | |
| checkDuplicates | back to summary |
|---|---|
| private void checkDuplicates(int count, String msg, String entryName) Issue warning for duplicate entries | |
| validate | back to summary |
|---|---|
| public void validate() Validate the jar entries by checking each entry in encounter order | |
| validateEntry | back to summary |
|---|---|
| private void validateEntry(String entryName, Validator. Validation per entry observed. Each entry must appear at least once in the CEN or LOC. | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| pack-priv Validator. | increase(IntSupplier
The supplier for the encounter order in the directory encounterOrder)Add to the appearance count. |
| pack-priv boolean | |
| public int | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| count | back to summary |
|---|---|
| private final int count Record Component accessed by count(). | |
| order | back to summary |
|---|---|
| private final int order Record Component accessed by order(). | |
| EntryEncounter | back to summary |
|---|---|
| pack-priv EntryEncounter(int order, int count) | |
| count | back to summary |
|---|---|
| public int count() Record Component getter of count. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| increase | back to summary |
|---|---|
| pack-priv Validator. Add to the appearance count.
| |
| isPlaceHolder | back to summary |
|---|---|
| pack-priv boolean isPlaceHolder() True if this entry is not in the directory. | |
| order | back to summary |
|---|---|
| public int order() Record Component getter of order. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Validator. | |
| private final Validator. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Validator. | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public Validator. | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| cen | back to summary |
|---|---|
| private final Validator. Record Component accessed by cen(). | |
| loc | back to summary |
|---|---|
| private final Validator. Record Component accessed by loc(). | |
| EntryInfo | back to summary |
|---|---|
| pack-priv EntryInfo(Validator. | |
| cen | back to summary |
|---|---|
| public Validator. Record Component getter of cen. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| loc | back to summary |
|---|---|
| public Validator. Record Component getter of loc. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| InvalidJarException | back to summary |
|---|---|
| pack-priv InvalidJarException(String msg) | |