|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.tool.JarWrapper.PreferredListWriter
private static class JarWrapper.PreferredListWriter
Compiles and writes combined preferred lists.
Nested Class Summary | |
---|---|
private class |
JarWrapper.PreferredListWriter.DirNode
Represents JAR-internal directory. |
private static class |
JarWrapper.PreferredListWriter.FileNode
Stores file preference state. |
Field Summary | |
---|---|
private List |
apiClasses
|
private static int |
FALSE_LEN
|
private static int |
NAME_LEN
|
private static int |
NEWLINE_LEN
|
private int |
numPrefs
|
private HashMap |
pathMap
|
private static int |
PREFERRED_LEN
|
private JarWrapper.PreferredListWriter.DirNode |
rootNode
|
private static int |
TRUE_LEN
|
Constructor Summary | |
---|---|
JarWrapper.PreferredListWriter(List apiClasses)
Constructs a PreferredListWriter . |
Method Summary | |
---|---|
(package private) void |
addEntries(JarFile jar,
JarWrapper.PreferredListReader prefReader)
Records preferred status of each file entry in the given JAR file, determined using the provided preferred list reader. |
private void |
addFile(String path,
String jarFileName,
boolean preferred)
Records the preferred setting of the given file entry. |
(package private) static int |
calcEntryLength(String name,
boolean pref)
Returns the number of characters needed to write a preferred list entry with the given name and preferred setting. |
(package private) static int |
min(int i1,
int i2,
int i3)
|
private static String |
parentPath(String path)
Returns path of the parent directory of the indicated JAR entry. |
(package private) void |
write(JarOutputStream jout)
Writes minimal combined preferred list to given output stream. |
(package private) static void |
writeEntry(Writer w,
String name,
boolean pref)
Writes preferred list entry with the given name and preferred setting. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int NAME_LEN
private static final int PREFERRED_LEN
private static final int TRUE_LEN
private static final int FALSE_LEN
private static final int NEWLINE_LEN
private final HashMap pathMap
private final JarWrapper.PreferredListWriter.DirNode rootNode
private int numPrefs
private final List apiClasses
Constructor Detail |
---|
JarWrapper.PreferredListWriter(List apiClasses)
PreferredListWriter
.
apiClasses
- list of URI paths representing classes that must be
considered API classes in case a preferences conflict arrises during
wrapping of JAR filesMethod Detail |
---|
void addEntries(JarFile jar, JarWrapper.PreferredListReader prefReader) throws IOException
IOException
void write(JarOutputStream jout) throws IOException
IOException
private void addFile(String path, String jarFileName, boolean preferred) throws IOException
IOException
private static String parentPath(String path)
static int min(int i1, int i2, int i3)
static int calcEntryLength(String name, boolean pref)
static void writeEntry(Writer w, String name, boolean pref) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |