| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final String | INDEX_NAME
The index file name. |
| private final HashMap | indexMap
The hash map that maintains mappings from package/class/resource to jar file list(s) |
| private String[] | |
| private final HashMap | jarMap
The hash map that maintains mappings from jar file to package/class/resource lists |
| private static final boolean | metaInfFilenames
true if, and only if, sun.misc.JarIndex.metaInfFilenames is set to true. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | addMapping(String jarItem, String jarName)
Same as add(String,String) except that it doesn't strip off from the last index of '/'. |
| private void | |
| private void | |
| public void |
| INDEX_NAME | back to summary |
|---|---|
| pack-priv static final String INDEX_NAME The index file name. | |
| indexMap | back to summary |
|---|---|
| private final HashMap<String, List<String>> indexMap The hash map that maintains mappings from package/class/resource to jar file list(s) | |
| jarFiles | back to summary |
|---|---|
| private String[] jarFiles | |
| jarMap | back to summary |
|---|---|
| private final HashMap<String, List<String>> jarMap The hash map that maintains mappings from jar file to package/class/resource lists | |
| metaInfFilenames | back to summary |
|---|---|
| private static final boolean metaInfFilenames true if, and only if, sun.misc.JarIndex.metaInfFilenames is set to true. If true, the names of the files in META-INF, and its subdirectories, will be added to the index. Otherwise, just the directory names are added. | |
| JarIndex | back to summary |
|---|---|
| public JarIndex(String[] files) throws IOException Constructs a new index for the specified list of jar files.
| |
| add | back to summary |
|---|---|
| private void add(String fileName, String jarName) Add the mapping from the specified file to the specified jar file. If there were no mapping for the package of the specified file before, a new list will be created, the jar file is added to the list and a new mapping from the package to the jar file list is added to the hashmap. Otherwise, the jar file will be added to the end of the existing list. | |
| addMapping | back to summary |
|---|---|
| private void addMapping(String jarItem, String jarName) Same as add(String,String) except that it doesn't strip off from the last index of '/'. It just adds the jarItem (filename or package) as it is received. | |
| addToList | back to summary |
|---|---|
| private void addToList(String key, String value, HashMap<String, List<String>> t) | |
| parseJars | back to summary |
|---|---|
| private void parseJars(String[] files) throws IOException Go through all the jar files and construct the index table. | |
| write | back to summary |
|---|---|
| public void write(OutputStream out) throws IOException Writes the index to the specified OutputStream
| |