Methods Summary |
---|
protected static javax.swing.text.html.parser.DTD | createDTD(javax.swing.text.html.parser.DTD dtd, java.lang.String name)
InputStream in = null;
boolean debug = true;
try {
String path = name + ".bdtd";
in = getResourceAsStream(path);
if (in != null) {
dtd.read(new DataInputStream(new BufferedInputStream(in)));
dtd.putDTDHash(name, dtd);
}
} catch (Exception e) {
System.out.println(e);
}
return dtd;
|
static java.io.InputStream | getResourceAsStream(java.lang.String name)Fetch a resource relative to the ParserDelegator classfile.
If this is called on 1.2 the loading will occur under the
protection of a doPrivileged call to allow the ParserDelegator
to function when used in an applet.
try {
return ResourceLoader.getResourceAsStream(name);
} catch (Throwable e) {
// If the class doesn't exist or we have some other
// problem we just try to call getResourceAsStream directly.
return ParserDelegator.class.getResourceAsStream(name);
}
|
public void | parse(java.io.Reader r, javax.swing.text.html.HTMLEditorKit$ParserCallback cb, boolean ignoreCharSet)
new DocumentParser(dtd).parse(r, cb, ignoreCharSet);
|
private void | readObject(java.io.ObjectInputStream s)
s.defaultReadObject();
if (dtd == null) {
setDefaultDTD();
}
|
protected static synchronized void | setDefaultDTD()
if (dtd == null) {
DTD _dtd = null;
// (PENDING) Hate having to hard code!
String nm = "html32";
try {
_dtd = DTD.getDTD(nm);
} catch (IOException e) {
// (PENDING) UGLY!
System.out.println("Throw an exception: could not get default dtd: " + nm);
}
dtd = createDTD(_dtd, nm);
}
|