Top Fields Constructors Methods
com.sun.xml.fastinfoset.stax.events

public abstract Class EventBase

extends Object
implements XMLEvent
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Known Direct Subclasses
com.sun.xml.fastinfoset.stax.events.ProcessingInstructionEvent, com.sun.xml.fastinfoset.stax.events.StartDocumentEvent, com.sun.xml.fastinfoset.stax.events.StartElementEvent, com.sun.xml.fastinfoset.stax.events.AttributeBase, com.sun.xml.fastinfoset.stax.events.CharactersEvent, com.sun.xml.fastinfoset.stax.events.CommentEvent, com.sun.xml.fastinfoset.stax.events.DTDEvent, com.sun.xml.fastinfoset.stax.events.EndDocumentEvent, com.sun.xml.fastinfoset.stax.events.EndElementEvent, com.sun.xml.fastinfoset.stax.events.EntityDeclarationImpl, com.sun.xml.fastinfoset.stax.events.EntityReferenceEvent
Imports
javax.xml.stream.Location, .XMLStreamException, javax.xml.stream.events.XMLEvent, .Characters, .EndElement, .StartElement, javax.xml.namespace.QName, java.io.Writer, com.sun.xml.fastinfoset.CommonResourceBundle

Field Summary

Modifier and TypeField and Description
protected int
protected Location

Constructor Summary

AccessConstructor and Description
protected
protected
EventBase(int eventType)

Method Summary

Modifier and TypeMethod and Description
public Characters
asCharacters()

Implements javax.xml.stream.events.XMLEvent.asCharacters.

Returns this event as Characters, may result in a class cast exception if this event is not Characters.

public EndElement
asEndElement()

Implements javax.xml.stream.events.XMLEvent.asEndElement.

Returns this event as an end element event, may result in a class cast exception if this event is not a end element.

public StartElement
asStartElement()

Implements javax.xml.stream.events.XMLEvent.asStartElement.

Returns this event as a start element event, may result in a class cast exception if this event is not a start element.

public int
getEventType()

Implements javax.xml.stream.events.XMLEvent.getEventType.

Returns an integer code for this event.

private String
public Location
getLocation()

Implements javax.xml.stream.events.XMLEvent.getLocation.

Return the location of this event.

public QName
getSchemaType()

Implements javax.xml.stream.events.XMLEvent.getSchemaType.

This method is provided for implementations to provide optional type information about the associated event.

public String
public boolean
isAttribute()

Implements javax.xml.stream.events.XMLEvent.isAttribute.

A utility function to check if this event is an Attribute.

public boolean
isCharacters()

Implements javax.xml.stream.events.XMLEvent.isCharacters.

A utility function to check if this event is Characters.

public boolean
isEndDocument()

Implements javax.xml.stream.events.XMLEvent.isEndDocument.

A utility function to check if this event is an EndDocument.

public boolean
isEndElement()

Implements javax.xml.stream.events.XMLEvent.isEndElement.

A utility function to check if this event is a EndElement.

public boolean
isEntityReference()

Implements javax.xml.stream.events.XMLEvent.isEntityReference.

A utility function to check if this event is an EntityReference.

public boolean
isNamespace()

Implements javax.xml.stream.events.XMLEvent.isNamespace.

A utility function to check if this event is a Namespace.

public boolean
isProcessingInstruction()

Implements javax.xml.stream.events.XMLEvent.isProcessingInstruction.

A utility function to check if this event is a ProcessingInstruction.

public boolean
isStartDocument()

Implements javax.xml.stream.events.XMLEvent.isStartDocument.

A utility function to check if this event is a StartDocument.

public boolean
isStartElement()

Implements javax.xml.stream.events.XMLEvent.isStartElement.

A utility function to check if this event is a StartElement.

protected final void
setEventType(int eventType)

public void
public void
writeAsEncodedUnicode(Writer
The writer that will output the data
writer
)

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_eventTypeback to summary
protected int _eventType
_locationback to summary
protected Location _location

Constructor Detail

EventBaseback to summary
protected EventBase()
EventBaseback to summary
protected EventBase(int eventType)

Method Detail

asCharactersback to summary
public Characters asCharacters()

Implements javax.xml.stream.events.XMLEvent.asCharacters.

Returns this event as Characters, may result in a class cast exception if this event is not Characters.

Annotations
@Override
asEndElementback to summary
public EndElement asEndElement()

Implements javax.xml.stream.events.XMLEvent.asEndElement.

Returns this event as an end element event, may result in a class cast exception if this event is not a end element.

Annotations
@Override
asStartElementback to summary
public StartElement asStartElement()

Implements javax.xml.stream.events.XMLEvent.asStartElement.

Returns this event as a start element event, may result in a class cast exception if this event is not a start element.

Annotations
@Override
getEventTypeback to summary
public int getEventType()

Implements javax.xml.stream.events.XMLEvent.getEventType.

Returns an integer code for this event.

Annotations
@Override
getEventTypeStringback to summary
private String getEventTypeString()
getLocationback to summary
public Location getLocation()

Implements javax.xml.stream.events.XMLEvent.getLocation.

Return the location of this event. The Location returned from this method is non-volatile and will retain its information.

Annotations
@Override
See Also
javax.xml.stream.Location
getSchemaTypeback to summary
public QName getSchemaType()

Implements javax.xml.stream.events.XMLEvent.getSchemaType.

This method is provided for implementations to provide optional type information about the associated event. It is optional and will return null if no information is available.

Annotations
@Override
getSystemIdback to summary
public String getSystemId()
isAttributeback to summary
public boolean isAttribute()

Implements javax.xml.stream.events.XMLEvent.isAttribute.

A utility function to check if this event is an Attribute.

Annotations
@Override
See Also
javax.xml.stream.events.Attribute
isCharactersback to summary
public boolean isCharacters()

Implements javax.xml.stream.events.XMLEvent.isCharacters.

A utility function to check if this event is Characters.

Annotations
@Override
See Also
javax.xml.stream.events.Characters
isEndDocumentback to summary
public boolean isEndDocument()

Implements javax.xml.stream.events.XMLEvent.isEndDocument.

Doc from javax.xml.stream.events.XMLEvent.isEndDocument.

A utility function to check if this event is an EndDocument.

Annotations
@Override
isEndElementback to summary
public boolean isEndElement()

Implements javax.xml.stream.events.XMLEvent.isEndElement.

Doc from javax.xml.stream.events.XMLEvent.isEndElement.

A utility function to check if this event is a EndElement.

Annotations
@Override
isEntityReferenceback to summary
public boolean isEntityReference()

Implements javax.xml.stream.events.XMLEvent.isEntityReference.

Doc from javax.xml.stream.events.XMLEvent.isEntityReference.

A utility function to check if this event is an EntityReference.

Annotations
@Override
isNamespaceback to summary
public boolean isNamespace()

Implements javax.xml.stream.events.XMLEvent.isNamespace.

A utility function to check if this event is a Namespace.

Annotations
@Override
See Also
javax.xml.stream.events.Namespace
isProcessingInstructionback to summary
public boolean isProcessingInstruction()

Implements javax.xml.stream.events.XMLEvent.isProcessingInstruction.

Doc from javax.xml.stream.events.XMLEvent.isProcessingInstruction.

A utility function to check if this event is a ProcessingInstruction.

Annotations
@Override
isStartDocumentback to summary
public boolean isStartDocument()

Implements javax.xml.stream.events.XMLEvent.isStartDocument.

Doc from javax.xml.stream.events.XMLEvent.isStartDocument.

A utility function to check if this event is a StartDocument.

Annotations
@Override
isStartElementback to summary
public boolean isStartElement()

Implements javax.xml.stream.events.XMLEvent.isStartElement.

Doc from javax.xml.stream.events.XMLEvent.isStartElement.

A utility function to check if this event is a StartElement.

Annotations
@Override
setEventTypeback to summary
protected final void setEventType(int eventType)
setLocationback to summary
public void setLocation(Location loc)
writeAsEncodedUnicodeback to summary
public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. No indentation or whitespace should be outputted.

Any user defined event type SHALL have this method called when being written to on an output stream. Built in Event types MUST implement this method, but implementations MAY choose not call these methods for optimizations reasons when writing out built in Events to an output stream. The output generated MUST be equivalent in terms of the infoset expressed.

Parameters
writer:Writer

The writer that will output the data

Annotations
@Override
Exceptions
XMLStreamException:
if there is a fatal error writing the event