APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.text.html.parser

public Class ParserDelegator

extends Parser
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@SuppressWarnings:serial
Imports
javax.swing.text.html.HTMLEditorKit, java.io.BufferedInputStream, .IOException, .InputStream, .DataInputStream, .ObjectInputStream, .Reader, .Serial, .Serializable

Responsible for starting up a new DocumentParser each time its parse method is invoked. Stores a reference to the dtd.

Warning

Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package.

Author
Sunita Mani

Field Summary

Modifier and TypeField and Description
private static DTD

Constructor Summary

AccessConstructor and Description
public
ParserDelegator()

Creates ParserDelegator with default DTD.

Method Summary

Modifier and TypeMethod and Description
protected static DTD

Returns:

the DTD with the specified name.
createDTD
(DTD
a DTD
dtd
,
String
the name of the resource, relative to the ParserDelegator class.
name
)

Recreates a DTD from an archived format with the specified name.

private static synchronized DTD
pack-priv static InputStream

Returns:

a stream representing the resource
getResourceAsStream
(final String
the name of the resource, relative to the ParserDelegator class.
name
)

Fetch a resource relative to the ParserDelegator classfile.

public void
parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet)

Implements abstract javax.swing.text.html.HTMLEditorKit.Parser.parse.

Parse the given stream and drive the given callback with the results of the parse.

private void
protected static void
setDefaultDTD()

Sets the default DTD.

Field Detail

dtdback to summary
private static DTD dtd

Constructor Detail

ParserDelegatorback to summary
public ParserDelegator()

Creates ParserDelegator with default DTD.

Method Detail

createDTDback to summary
protected static DTD createDTD(DTD dtd, String name)

Recreates a DTD from an archived format with the specified name.

Parameters
dtd:DTD

a DTD

name:String

the name of the resource, relative to the ParserDelegator class.

Returns:DTD

the DTD with the specified name.

getDefaultDTDback to summary
private static synchronized DTD getDefaultDTD()
getResourceAsStreamback to summary
pack-priv static InputStream getResourceAsStream(final String name)

Fetch a resource relative to the ParserDelegator classfile.

Parameters
name:String

the name of the resource, relative to the ParserDelegator class.

Returns:InputStream

a stream representing the resource

parseback to summary
public void parse(Reader r, HTMLEditorKit.ParserCallback cb, boolean ignoreCharSet) throws IOException

Implements abstract javax.swing.text.html.HTMLEditorKit.Parser.parse.

Doc from javax.swing.text.html.HTMLEditorKit.Parser.parse.

Parse the given stream and drive the given callback with the results of the parse. This method should be implemented to be thread-safe.

Exceptions
IOException:
if an I/O exception occurs
readObjectback to summary
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException
Annotations
@Serial
setDefaultDTDback to summary
protected static void setDefaultDTD()

Sets the default DTD.