Top Description Inners Fields Constructors Methods
org.dom4j.io

public Class SAXEventRecorder

extends DefaultHandler
implements LexicalHandler, DeclHandler, DTDHandler, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.xml.sax.DTDHandler, org.xml.sax.ext.DeclHandler, org.xml.sax.ext.LexicalHandler
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, java.util.ArrayList, .HashMap, .Iterator, .List, .Map, org.dom4j.Namespace, .QName, org.xml.sax.Attributes, .ContentHandler, .DTDHandler, .SAXException, org.xml.sax.ext.DeclHandler, .LexicalHandler, org.xml.sax.helpers.AttributesImpl, .DefaultHandler

Records SAX events such that they may be "replayed" at a later time. Provides an alternative serialization approach when externalizing a DOM4J document. Rather than serializing a document as text and re-parsing, the sax events may be serialized instead.

Example usage:



        SAXEventRecorder recorder = new SAXEventRecorder();
        SAXWriter saxWriter = new SAXWriter(recorder, recorder);
        saxWriter.write(document);
        out.writeObject(recorder);
        ...
        SAXEventRecorder recorder = (SAXEventRecorder)in.readObject();
        SAXContentHandler saxContentHandler = new SAXContentHandler();
        recorder.replay(saxContentHandler);
        Document document = saxContentHandler.getDocument();



Author
Todd Wolff (Bluestem Software)

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final String
private List<SAXEventRecorder.SAXEvent>
private static final byte
private static final byte
private Map<QName, List<String>>
public static final long
private static final byte
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
attributeDecl(String
The name of the associated element.
eName
,
String
The name of the attribute.
aName
,
String
A string representing the attribute type.
type
,
String
A string representing the attribute defaulting mode ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies.
valueDefault
,
String
A string representing the attribute's default value, or null if there is none.
value
)

Implements org.xml.sax.ext.DeclHandler.attributeDecl.

Report an attribute type declaration.
public void
characters(char[]
The characters.
ch
,
int
The start position in the character array.
start
,
int
The number of characters to use from the character array.
end
)

Overrides org.xml.sax.helpers.DefaultHandler.characters.

Implements org.xml.sax.ContentHandler.characters.

Receive notification of character data inside an element.
public void
comment(char[]
An array holding the characters in the comment.
ch
,
int
The starting position in the array.
start
,
int
The number of characters to use from the array.
end
)

Implements org.xml.sax.ext.LexicalHandler.comment.

Report an XML comment anywhere in the document.
public void
elementDecl(String
The element type name.
name
,
String
The content model as a normalized string.
model
)

Implements org.xml.sax.ext.DeclHandler.elementDecl.

Report an element type declaration.
public void
endCDATA()

Implements org.xml.sax.ext.LexicalHandler.endCDATA.

Report the end of a CDATA section.
public void
endDocument()

Overrides org.xml.sax.helpers.DefaultHandler.endDocument.

Implements org.xml.sax.ContentHandler.endDocument.

Receive notification of the end of the document.
public void
endDTD()

Implements org.xml.sax.ext.LexicalHandler.endDTD.

Report the end of DTD declarations.
public void
endElement(String
The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
namespaceURI
,
String
The local name (without prefix), or the empty string if Namespace processing is not being performed.
localName
,
String
The qualified name (with prefix), or the empty string if qualified names are not available.
qName
)

Overrides org.xml.sax.helpers.DefaultHandler.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Receive notification of the end of an element.
public void
endEntity(String
The name of the entity that is ending.
name
)

Implements org.xml.sax.ext.LexicalHandler.endEntity.

Report the end of an entity.
public void
endPrefixMapping(String
The Namespace prefix being declared.
prefix
)

Overrides org.xml.sax.helpers.DefaultHandler.endPrefixMapping.

Implements org.xml.sax.ContentHandler.endPrefixMapping.

Receive notification of the end of a Namespace mapping.
public void
externalEntityDecl(String
The name of the entity. If it is a parameter entity, the name will begin with '%'.
name
,
String
The entity's public identifier, or null if none was given.
publicId
,
String
The entity's system identifier.
sysId
)

Implements org.xml.sax.ext.DeclHandler.externalEntityDecl.

Report a parsed external entity declaration.
public void
internalEntityDecl(String
The name of the entity. If it is a parameter entity, the name will begin with '%'.
name
,
String
The replacement text of the entity.
value
)

Implements org.xml.sax.ext.DeclHandler.internalEntityDecl.

Report an internal entity declaration.
public void
processingInstruction(String
The processing instruction target.
target
,
String
The processing instruction data, or null if none is supplied.
data
)

Overrides org.xml.sax.helpers.DefaultHandler.processingInstruction.

Implements org.xml.sax.ContentHandler.processingInstruction.

Receive notification of a processing instruction.
public void
readExternal(ObjectInput
the stream to read data from in order to restore the object
in
)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
public void
public void
startCDATA()

Implements org.xml.sax.ext.LexicalHandler.startCDATA.

Report the start of a CDATA section.
public void
startDocument()

Overrides org.xml.sax.helpers.DefaultHandler.startDocument.

Implements org.xml.sax.ContentHandler.startDocument.

Receive notification of the beginning of the document.
public void
startDTD(String
The document type name.
name
,
String
The declared public identifier for the external DTD subset, or null if none was declared.
publicId
,
String
The declared system identifier for the external DTD subset, or null if none was declared. (Note that this is not resolved against the document base URI.)
systemId
)

Implements org.xml.sax.ext.LexicalHandler.startDTD.

Report the start of DTD declarations, if any.
public void
startElement(String
The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
namespaceURI
,
String
The local name (without prefix), or the empty string if Namespace processing is not being performed.
localName
,
String
The qualified name (with prefix), or the empty string if qualified names are not available.
qualifiedName
,
Attributes
The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
attributes
)

Overrides org.xml.sax.helpers.DefaultHandler.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Receive notification of the start of an element.
public void
startEntity(String
The name of the entity. If it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be "[dtd]".
name
)

Implements org.xml.sax.ext.LexicalHandler.startEntity.

Report the beginning of some internal and external XML entities.
public void
startPrefixMapping(String
The Namespace prefix being declared.
prefix
,
String
The Namespace URI mapped to the prefix.
uri
)

Overrides org.xml.sax.helpers.DefaultHandler.startPrefixMapping.

Implements org.xml.sax.ContentHandler.startPrefixMapping.

Receive notification of the start of a Namespace mapping.
public void
writeExternal(ObjectOutput
the stream to write the object to
out
)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
Inherited from org.xml.sax.helpers.DefaultHandler:
errorfatalErrorignorableWhitespacenotationDeclresolveEntitysetDocumentLocatorskippedEntityunparsedEntityDeclwarning

Field Detail

EMPTY_STRINGback to summary
private static final String EMPTY_STRING
eventsback to summary
private List<SAXEventRecorder.SAXEvent> events
NULLback to summary
private static final byte NULL
OBJECTback to summary
private static final byte OBJECT
prefixMappingsback to summary
private Map<QName, List<String>> prefixMappings
serialVersionUIDback to summary
public static final long serialVersionUID
STRINGback to summary
private static final byte STRING
XMLNSback to summary
private static final String XMLNS

Constructor Detail

SAXEventRecorderback to summary
public SAXEventRecorder()

Method Detail

attributeDeclback to summary
public void attributeDecl(String eName, String aName, String type, String valueDefault, String value) throws SAXException

Implements org.xml.sax.ext.DeclHandler.attributeDecl.

Doc from org.xml.sax.ext.DeclHandler.attributeDecl.

Report an attribute type declaration.

Only the effective (first) declaration for an attribute will be reported. The type will be one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", a parenthesized token group with the separator "|" and all whitespace removed, or the word "NOTATION" followed by a space followed by a parenthesized token group with all whitespace removed.

The value will be the value as reported to applications, appropriately normalized and with entity and character references expanded.

Parameters
eName:String

The name of the associated element.

aName:String

The name of the attribute.

type:String

A string representing the attribute type.

valueDefault:String

A string representing the attribute defaulting mode ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies.

value:String

A string representing the attribute's default value, or null if there is none.

Exceptions
SAXException:
The application may raise an exception.
charactersback to summary
public void characters(char[] ch, int start, int end) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.characters.

Implements org.xml.sax.ContentHandler.characters.

Doc from org.xml.sax.helpers.DefaultHandler.characters.

Receive notification of character data inside an element.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).

Parameters
ch:char[]

The characters.

start:int

The start position in the character array.

end:int

The number of characters to use from the character array.

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
commentback to summary
public void comment(char[] ch, int start, int end) throws SAXException

Implements org.xml.sax.ext.LexicalHandler.comment.

Doc from org.xml.sax.ext.LexicalHandler.comment.

Report an XML comment anywhere in the document.

This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read). Comments in the DTD must be properly nested inside start/endDTD and start/endEntity events (if used).

Parameters
ch:char[]

An array holding the characters in the comment.

start:int

The starting position in the array.

end:int

The number of characters to use from the array.

Exceptions
SAXException:
The application may raise an exception.
elementDeclback to summary
public void elementDecl(String name, String model) throws SAXException

Implements org.xml.sax.ext.DeclHandler.elementDecl.

Doc from org.xml.sax.ext.DeclHandler.elementDecl.

Report an element type declaration.

The content model will consist of the string "EMPTY", the string "ANY", or a parenthesised group, optionally followed by an occurrence indicator. The model will be normalized so that all parameter entities are fully resolved and all whitespace is removed, and will include the enclosing parentheses. Other normalization (such as removing redundant parentheses or simplifying occurrence indicators) is at the discretion of the parser.

Parameters
name:String

The element type name.

model:String

The content model as a normalized string.

Exceptions
SAXException:
The application may raise an exception.
endCDATAback to summary
public void endCDATA() throws SAXException

Implements org.xml.sax.ext.LexicalHandler.endCDATA.

Doc from org.xml.sax.ext.LexicalHandler.endCDATA.

Report the end of a CDATA section.

Exceptions
SAXException:
The application may raise an exception.
endDocumentback to summary
public void endDocument() throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.endDocument.

Implements org.xml.sax.ContentHandler.endDocument.

Doc from org.xml.sax.helpers.DefaultHandler.endDocument.

Receive notification of the end of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
endDTDback to summary
public void endDTD() throws SAXException

Implements org.xml.sax.ext.LexicalHandler.endDTD.

Doc from org.xml.sax.ext.LexicalHandler.endDTD.

Report the end of DTD declarations.

This method is intended to report the end of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.

Exceptions
SAXException:
The application may raise an exception.
endElementback to summary
public void endElement(String namespaceURI, String localName, String qName) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Doc from org.xml.sax.helpers.DefaultHandler.endElement.

Receive notification of the end of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).

Parameters
namespaceURI:String

The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.

localName:String

The local name (without prefix), or the empty string if Namespace processing is not being performed.

qName:String

The qualified name (with prefix), or the empty string if qualified names are not available.

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
endEntityback to summary
public void endEntity(String name) throws SAXException

Implements org.xml.sax.ext.LexicalHandler.endEntity.

Doc from org.xml.sax.ext.LexicalHandler.endEntity.

Report the end of an entity.

Parameters
name:String

The name of the entity that is ending.

Exceptions
SAXException:
The application may raise an exception.
endPrefixMappingback to summary
public void endPrefixMapping(String prefix) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.endPrefixMapping.

Implements org.xml.sax.ContentHandler.endPrefixMapping.

Doc from org.xml.sax.helpers.DefaultHandler.endPrefixMapping.

Receive notification of the end of a Namespace mapping.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each prefix mapping.

Parameters
prefix:String

The Namespace prefix being declared.

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
externalEntityDeclback to summary
public void externalEntityDecl(String name, String publicId, String sysId) throws SAXException

Implements org.xml.sax.ext.DeclHandler.externalEntityDecl.

Doc from org.xml.sax.ext.DeclHandler.externalEntityDecl.

Report a parsed external entity declaration.

Only the effective (first) declaration for each entity will be reported.

If the system identifier is a URL, the parser must resolve it fully before passing it to the application.

Parameters
name:String

The name of the entity. If it is a parameter entity, the name will begin with '%'.

publicId:String

The entity's public identifier, or null if none was given.

sysId:String

The entity's system identifier.

Exceptions
SAXException:
The application may raise an exception.
internalEntityDeclback to summary
public void internalEntityDecl(String name, String value) throws SAXException

Implements org.xml.sax.ext.DeclHandler.internalEntityDecl.

Doc from org.xml.sax.ext.DeclHandler.internalEntityDecl.

Report an internal entity declaration.

Only the effective (first) declaration for each entity will be reported. All parameter entities in the value will be expanded, but general entities will not.

Parameters
name:String

The name of the entity. If it is a parameter entity, the name will begin with '%'.

value:String

The replacement text of the entity.

Exceptions
SAXException:
The application may raise an exception.
processingInstructionback to summary
public void processingInstruction(String target, String data) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.processingInstruction.

Implements org.xml.sax.ContentHandler.processingInstruction.

Doc from org.xml.sax.helpers.DefaultHandler.processingInstruction.

Receive notification of a processing instruction.

By default, do nothing. Application writers may override this method in a subclass to take specific actions for each processing instruction, such as setting status variables or invoking other methods.

Parameters
target:String

The processing instruction target.

data:String

The processing instruction data, or null if none is supplied.

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
readExternalback to summary
public void readExternal(ObjectInput in) throws ClassNotFoundException, IOException

Implements java.io.Externalizable.readExternal.

Doc from java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Parameters
in:ObjectInput

the stream to read data from in order to restore the object

Exceptions
ClassNotFoundException:
If the class for an object being restored cannot be found.
IOException:
if I/O errors occur
replayback to summary
public void replay(ContentHandler handler) throws SAXException
startCDATAback to summary
public void startCDATA() throws SAXException

Implements org.xml.sax.ext.LexicalHandler.startCDATA.

Doc from org.xml.sax.ext.LexicalHandler.startCDATA.

Report the start of a CDATA section.

The contents of the CDATA section will be reported through the regular characters event; this event is intended only to report the boundary.

Exceptions
SAXException:
The application may raise an exception.
startDocumentback to summary
public void startDocument() throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.startDocument.

Implements org.xml.sax.ContentHandler.startDocument.

Doc from org.xml.sax.helpers.DefaultHandler.startDocument.

Receive notification of the beginning of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
startDTDback to summary
public void startDTD(String name, String publicId, String systemId) throws SAXException

Implements org.xml.sax.ext.LexicalHandler.startDTD.

Doc from org.xml.sax.ext.LexicalHandler.startDTD.

Report the start of DTD declarations, if any.

This method is intended to report the beginning of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.

All declarations reported through DTDHandler or DeclHandler events must appear between the startDTD and endDTD events. Declarations are assumed to belong to the internal DTD subset unless they appear between startEntity and endEntity events. Comments and processing instructions from the DTD should also be reported between the startDTD and endDTD events, in their original order of (logical) occurrence; they are not required to appear in their correct locations relative to DTDHandler or DeclHandler events, however.

Note that the start/endDTD events will appear within the start/endDocument events from ContentHandler and before the first startElement event.

Parameters
name:String

The document type name.

publicId:String

The declared public identifier for the external DTD subset, or null if none was declared.

systemId:String

The declared system identifier for the external DTD subset, or null if none was declared. (Note that this is not resolved against the document base URI.)

Exceptions
SAXException:
The application may raise an exception.
startElementback to summary
public void startElement(String namespaceURI, String localName, String qualifiedName, Attributes attributes) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Doc from org.xml.sax.helpers.DefaultHandler.startElement.

Receive notification of the start of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

Parameters
namespaceURI:String

The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.

localName:String

The local name (without prefix), or the empty string if Namespace processing is not being performed.

qualifiedName:String

The qualified name (with prefix), or the empty string if qualified names are not available.

attributes:Attributes

The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
startEntityback to summary
public void startEntity(String name) throws SAXException

Implements org.xml.sax.ext.LexicalHandler.startEntity.

Doc from org.xml.sax.ext.LexicalHandler.startEntity.

Report the beginning of some internal and external XML entities.

The reporting of parameter entities (including the external DTD subset) is optional, and SAX2 drivers that report LexicalHandler events may not implement it; you can use the http://xml.org/sax/features/lexical-handler/parameter-entities feature to query or control the reporting of parameter entities.

General entities are reported with their regular names, parameter entities have '%' prepended to their names, and the external DTD subset has the pseudo-entity name "[dtd]".

When a SAX2 driver is providing these events, all other events must be properly nested within start/end entity events. There is no additional requirement that events from DeclHandler or DTDHandler be properly ordered.

Note that skipped entities will be reported through the skippedEntity event, which is part of the ContentHandler interface.

Because of the streaming event model that SAX uses, some entity boundaries cannot be reported under any circumstances:

  • general entities within attribute values
  • parameter entities within declarations

These will be silently expanded, with no indication of where the original entity boundaries were.

Note also that the boundaries of character references (which are not really entities anyway) are not reported.

All start/endEntity events must be properly nested.

Parameters
name:String

The name of the entity. If it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be "[dtd]".

Exceptions
SAXException:
The application may raise an exception.
startPrefixMappingback to summary
public void startPrefixMapping(String prefix, String uri) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.startPrefixMapping.

Implements org.xml.sax.ContentHandler.startPrefixMapping.

Doc from org.xml.sax.helpers.DefaultHandler.startPrefixMapping.

Receive notification of the start of a Namespace mapping.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each Namespace prefix scope (such as storing the prefix mapping).

Parameters
prefix:String

The Namespace prefix being declared.

uri:String

The Namespace URI mapped to the prefix.

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Doc from java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Parameters
out:ObjectOutput

the stream to write the object to

Exceptions
IOException:
Includes any I/O exceptions that may occur
org.dom4j.io back to summary

pack-priv Class SAXEventRecorder.SAXEvent

extends Object
implements Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable

Field Summary

Modifier and TypeField and Description
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
protected byte
pack-priv static final byte
pack-priv static final byte
protected List<Object>
pack-priv static final byte
public static final long
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte

Constructor Summary

AccessConstructor and Description
public
pack-priv
SAXEvent(byte event)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv Object
getParm(int index)

public void
readExternal(ObjectInput
the stream to read data from in order to restore the object
in
)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
public void
writeExternal(ObjectOutput
the stream to write the object to
out
)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ATTRIBUTE_DECLback to summary
pack-priv static final byte ATTRIBUTE_DECL
CHARACTERSback to summary
pack-priv static final byte CHARACTERS
COMMENTback to summary
pack-priv static final byte COMMENT
ELEMENT_DECLback to summary
pack-priv static final byte ELEMENT_DECL
END_CDATAback to summary
pack-priv static final byte END_CDATA
END_DOCUMENTback to summary
pack-priv static final byte END_DOCUMENT
END_DTDback to summary
pack-priv static final byte END_DTD
END_ELEMENTback to summary
pack-priv static final byte END_ELEMENT
END_ENTITYback to summary
pack-priv static final byte END_ENTITY
END_PREFIX_MAPPINGback to summary
pack-priv static final byte END_PREFIX_MAPPING
eventback to summary
protected byte event
EXTERNAL_ENTITY_DECLback to summary
pack-priv static final byte EXTERNAL_ENTITY_DECL
INTERNAL_ENTITY_DECLback to summary
pack-priv static final byte INTERNAL_ENTITY_DECL
parmsback to summary
protected List<Object> parms
PROCESSING_INSTRUCTIONback to summary
pack-priv static final byte PROCESSING_INSTRUCTION
serialVersionUIDback to summary
public static final long serialVersionUID
START_CDATAback to summary
pack-priv static final byte START_CDATA
START_DOCUMENTback to summary
pack-priv static final byte START_DOCUMENT
START_DTDback to summary
pack-priv static final byte START_DTD
START_ELEMENTback to summary
pack-priv static final byte START_ELEMENT
START_ENTITYback to summary
pack-priv static final byte START_ENTITY
START_PREFIX_MAPPINGback to summary
pack-priv static final byte START_PREFIX_MAPPING

Constructor Detail

SAXEventback to summary
public SAXEvent()
SAXEventback to summary
pack-priv SAXEvent(byte event)

Method Detail

addParmback to summary
pack-priv void addParm(Object parm)
getParmback to summary
pack-priv Object getParm(int index)
readExternalback to summary
public void readExternal(ObjectInput in) throws ClassNotFoundException, IOException

Implements java.io.Externalizable.readExternal.

Doc from java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Parameters
in:ObjectInput

the stream to read data from in order to restore the object

Exceptions
ClassNotFoundException:
If the class for an object being restored cannot be found.
IOException:
if I/O errors occur
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Doc from java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Parameters
out:ObjectOutput

the stream to write the object to

Exceptions
IOException:
Includes any I/O exceptions that may occur