Top Description Constructors Methods
org.jvnet.fastinfoset.sax.helpers

public Class FastInfosetDefaultHandler

extends DefaultHandler
implements LexicalHandler, EncodingAlgorithmContentHandler, PrimitiveTypeContentHandler
Class Inheritance
All Implemented Interfaces
org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler, org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler, org.xml.sax.ext.LexicalHandler
Imports
org.jvnet.fastinfoset.sax.*, org.xml.sax.SAXException, org.xml.sax.ext.LexicalHandler, org.xml.sax.helpers.DefaultHandler

Default base class for SAX event handlers of a FastInfosetReader.

This class is available as a convenience for applications: it provides default implementations for all of the callbacks of the following:

Application writers can extend this class when they need to implement only part of an interface; parser writers can instantiate this class to provide default handlers when the application has not supplied its own.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
booleans(boolean[] b, int start, int length)

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.booleans.

Receive notification of character data as an array of boolean.

public void
bytes(byte[] b, int start, int length)

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.bytes.

Receive notification of character data as an array of byte.

public void
comment(char[] ch, int start, int length)

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

Report an XML comment anywhere in the document.

public void
doubles(double[] d, int start, int length)

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.doubles.

Receive notification of character data as an array of double.

public void
endCDATA()

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

Report the end of a CDATA section.

public void
endDTD()

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

Report the end of DTD declarations.

public void
endEntity(String name)

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

Report the end of an entity.

public void
floats(float[] f, int start, int length)

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.floats.

Receive notification of character data as an array of float.

public void
ints(int[] i, int start, int length)

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.ints.

Receive notification of character data as an array of int.

public void
longs(long[] l, int start, int length)

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.longs.

Receive notification of character data as an array of long.

public void
object(String URI, int algorithm, Object o)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler.object.

Receive notification of encoding algorithm data as an object.

public void
octets(String URI, int algorithm, byte[] b, int start, int length)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler.octets.

Receive notification of encoding algorithm data as an array of byte.

public void
shorts(short[] s, int start, int length)

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.shorts.

Receive notification of character data as an array of short.

public void
startCDATA()

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

Report the start of a CDATA section.

public void
startDTD(String name, String publicId, String systemId)

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

Report the start of DTD declarations, if any.

public void
startEntity(String name)

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

Report the beginning of some internal and external XML entities.

public void
uuids(long[] msblsb, int start, int length)

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.uuids.

Receive notification of character data as an two array of UUID.

Inherited from org.xml.sax.helpers.DefaultHandler:
charactersendDocumentendElementendPrefixMappingerrorfatalErrorignorableWhitespacenotationDeclprocessingInstructionresolveEntitysetDocumentLocatorskippedEntitystartDocumentstartElementstartPrefixMappingunparsedEntityDeclwarning

Constructor Detail

FastInfosetDefaultHandlerback to summary
public FastInfosetDefaultHandler()

Method Detail

booleansback to summary
public void booleans(boolean[] b, int start, int length) throws SAXException

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.booleans.

Doc from org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.booleans.

Receive notification of character data as an array of boolean.

The application must not attempt to read from the array outside of the specified range.

Such notifications will occur for a Fast Infoset SAX parser when processing data encoded using the "boolean" encoding algorithm, see subclause 10.7

.

Annotations
@Override
Exceptions
SAXException:
any SAX exception, possibly wrapping another exception
bytesback to summary
public void bytes(byte[] b, int start, int length) throws SAXException

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.bytes.

Doc from org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.bytes.

Receive notification of character data as an array of byte.

The application must not attempt to read from the array outside of the specified range.

Such notifications will occur for a Fast Infoset SAX parser when processing data encoded using the "base64" encoding algorithm, see subclause 10.3, or the "hexadecimal" encoding algorithm, see subclause 10.2.

Such a notification may occur for binary data that would normally require base 64 encoding and reported as character data using the characters method

.

Annotations
@Override
Exceptions
SAXException:
any SAX exception, possibly wrapping another exception
commentback to summary
public void comment(char[] ch, int start, int length) 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).

Annotations
@Override
Exceptions
SAXException:
The application may raise an exception.
doublesback to summary
public void doubles(double[] d, int start, int length) throws SAXException

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.doubles.

Doc from org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.doubles.

Receive notification of character data as an array of double.

The application must not attempt to read from the array outside of the specified range.

Such notifications will occur for a Fast Infoset SAX parser when processing data encoded using the "double" encoding algorithm, see subclause 10.9

.

Annotations
@Override
Exceptions
SAXException:
any SAX exception, possibly wrapping another 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.

Annotations
@Override
Exceptions
SAXException:
The application may raise an 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.

Annotations
@Override
Exceptions
SAXException:
The application may raise an 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.

Annotations
@Override
Exceptions
SAXException:
The application may raise an exception.
floatsback to summary
public void floats(float[] f, int start, int length) throws SAXException

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.floats.

Doc from org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.floats.

Receive notification of character data as an array of float.

The application must not attempt to read from the array outside of the specified range.

Such notifications will occur for a Fast Infoset SAX parser when processing data encoded using the "float" encoding algorithm, see subclause 10.8

.

Annotations
@Override
Exceptions
SAXException:
any SAX exception, possibly wrapping another exception
intsback to summary
public void ints(int[] i, int start, int length) throws SAXException

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.ints.

Doc from org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.ints.

Receive notification of character data as an array of int.

The application must not attempt to read from the array outside of the specified range.

Such notifications will occur for a Fast Infoset SAX parser when processing data encoded using the "int" encoding algorithm, see subclause 10.5

.

Annotations
@Override
Exceptions
SAXException:
any SAX exception, possibly wrapping another exception
longsback to summary
public void longs(long[] l, int start, int length) throws SAXException

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.longs.

Doc from org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.longs.

Receive notification of character data as an array of long.

The application must not attempt to read from the array outside of the specified range.

Such notifications will occur for a Fast Infoset SAX parser when processing data encoded using the "long" encoding algorithm, see subclause 10.6

.

Annotations
@Override
Exceptions
SAXException:
any SAX exception, possibly wrapping another exception
objectback to summary
public void object(String URI, int algorithm, Object o) throws SAXException

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler.object.

Doc from org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler.object.

Receive notification of encoding algorithm data as an object.

Such notifications will occur for a Fast Infoset SAX parser when processing encoding algorithm data that is converted from an array of byte to an object more suitable for processing.

Annotations
@Override
Exceptions
SAXException:
any SAX exception, possibly wrapping another exception
octetsback to summary
public void octets(String URI, int algorithm, byte[] b, int start, int length) throws SAXException

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler.octets.

Doc from org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler.octets.

Receive notification of encoding algorithm data as an array of byte.

The application must not attempt to read from the array outside of the specified range.

Such notifications will occur for a Fast Infoset SAX parser when processing encoding algorithm data.

The Parser will call the method of this interface to report each encoding algorithm data. Parsers MUST return all contiguous characters in a single chunk

Parsers may return all contiguous bytes in a single chunk, or they may split it into several chunks providing that the length of each chunk is of the required length to successfully apply the encoding algorithm to the chunk.

Annotations
@Override
Exceptions
SAXException:
any SAX exception, possibly wrapping another exception
shortsback to summary
public void shorts(short[] s, int start, int length) throws SAXException

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.shorts.

Doc from org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.shorts.

Receive notification of character data as an array of short.

The application must not attempt to read from the array outside of the specified range.

Such notifications will occur for a Fast Infoset SAX parser when processing data encoded using the "short" encoding algorithm, see subclause 10.4

.

Annotations
@Override
Exceptions
SAXException:
any SAX exception, possibly wrapping another exception
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.

Annotations
@Override
Exceptions
SAXException:
The application may raise an 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.

Annotations
@Override
Exceptions
SAXException:
The application may raise an 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.

Annotations
@Override
Exceptions
SAXException:
The application may raise an exception.
uuidsback to summary
public void uuids(long[] msblsb, int start, int length) throws SAXException

Implements org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.uuids.

Doc from org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler.uuids.

Receive notification of character data as an two array of UUID.

The application must not attempt to read from the array outside of the specified range.

Such notifications will occur for a Fast Infoset SAX parser when processing data encoded using the "uuid" encoding algorithm, see subclause 10.10

.

Annotations
@Override
Exceptions
SAXException:
any SAX exception, possibly wrapping another exception