Class FastInfosetDefaultHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.jvnet.fastinfoset.sax.helpers.FastInfosetDefaultHandler
-
- All Implemented Interfaces:
EncodingAlgorithmContentHandler,PrimitiveTypeContentHandler,ContentHandler,DTDHandler,EntityResolver,ErrorHandler,LexicalHandler
public class FastInfosetDefaultHandler extends DefaultHandler implements LexicalHandler, EncodingAlgorithmContentHandler, PrimitiveTypeContentHandler
Default base class for SAX event handlers of aFastInfosetReader.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
Constructors Constructor Description FastInfosetDefaultHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbooleans(boolean[] b, int start, int length)Receive notification of character data as an array of boolean.voidbytes(byte[] b, int start, int length)Receive notification of character data as an array of byte.voidcomment(char[] ch, int start, int length)voiddoubles(double[] d, int start, int length)Receive notification of character data as an array of double.voidendCDATA()voidendDTD()voidendEntity(String name)voidfloats(float[] f, int start, int length)Receive notification of character data as an array of float.voidints(int[] i, int start, int length)Receive notification of character data as an array of int.voidlongs(long[] l, int start, int length)Receive notification of character data as an array of long.voidobject(String URI, int algorithm, Object o)Receive notification of encoding algorithm data as an object.voidoctets(String URI, int algorithm, byte[] b, int start, int length)Receive notification of encoding algorithm data as an array of byte.voidshorts(short[] s, int start, int length)Receive notification of character data as an array of short.voidstartCDATA()voidstartDTD(String name, String publicId, String systemId)voidstartEntity(String name)voiduuids(long[] msblsb, int start, int length)Receive notification of character data as an two array of UUID.-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Method Detail
-
comment
public void comment(char[] ch, int start, int length) throws SAXException- Specified by:
commentin interfaceLexicalHandler- Throws:
SAXException
-
startCDATA
public void startCDATA() throws SAXException- Specified by:
startCDATAin interfaceLexicalHandler- Throws:
SAXException
-
endCDATA
public void endCDATA() throws SAXException- Specified by:
endCDATAin interfaceLexicalHandler- Throws:
SAXException
-
startDTD
public void startDTD(String name, String publicId, String systemId) throws SAXException
- Specified by:
startDTDin interfaceLexicalHandler- Throws:
SAXException
-
endDTD
public void endDTD() throws SAXException- Specified by:
endDTDin interfaceLexicalHandler- Throws:
SAXException
-
startEntity
public void startEntity(String name) throws SAXException
- Specified by:
startEntityin interfaceLexicalHandler- Throws:
SAXException
-
endEntity
public void endEntity(String name) throws SAXException
- Specified by:
endEntityin interfaceLexicalHandler- Throws:
SAXException
-
octets
public void octets(String URI, int algorithm, byte[] b, int start, int length) throws SAXException
Description copied from interface:EncodingAlgorithmContentHandlerReceive 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.
- Specified by:
octetsin interfaceEncodingAlgorithmContentHandler- Parameters:
URI- the URI of the encoding algorithmalgorithm- the encoding algorithm indexb- the array of bytestart- the start position in the arraylength- the number of byte to read from the array- Throws:
SAXException- any SAX exception, possibly wrapping another exception- See Also:
EncodingAlgorithmIndexes
-
object
public void object(String URI, int algorithm, Object o) throws SAXException
Description copied from interface:EncodingAlgorithmContentHandlerReceive 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.
- Specified by:
objectin interfaceEncodingAlgorithmContentHandler- Parameters:
URI- the URI of the encoding algorithmalgorithm- the encoding algorithm indexo- the encoding algorithm object- Throws:
SAXException- any SAX exception, possibly wrapping another exception- See Also:
EncodingAlgorithmIndexes
-
booleans
public void booleans(boolean[] b, int start, int length) throws SAXExceptionDescription copied from interface:PrimitiveTypeContentHandlerReceive 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
.
- Specified by:
booleansin interfacePrimitiveTypeContentHandler- Parameters:
b- the array of booleanstart- the start position in the arraylength- the number of boolean to read from the array- Throws:
SAXException- any SAX exception, possibly wrapping another exception
-
bytes
public void bytes(byte[] b, int start, int length) throws SAXExceptionDescription copied from interface:PrimitiveTypeContentHandlerReceive 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
charactersmethod.
- Specified by:
bytesin interfacePrimitiveTypeContentHandler- Parameters:
b- the array of bytestart- the start position in the arraylength- the number of byte to read from the array- Throws:
SAXException- any SAX exception, possibly wrapping another exception
-
shorts
public void shorts(short[] s, int start, int length) throws SAXExceptionDescription copied from interface:PrimitiveTypeContentHandlerReceive 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
.
- Specified by:
shortsin interfacePrimitiveTypeContentHandler- Parameters:
s- the array of shortstart- the start position in the arraylength- the number of short to read from the array- Throws:
SAXException- any SAX exception, possibly wrapping another exception
-
ints
public void ints(int[] i, int start, int length) throws SAXExceptionDescription copied from interface:PrimitiveTypeContentHandlerReceive 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
.
- Specified by:
intsin interfacePrimitiveTypeContentHandler- Parameters:
i- the array of intstart- the start position in the arraylength- the number of int to read from the array- Throws:
SAXException- any SAX exception, possibly wrapping another exception
-
longs
public void longs(long[] l, int start, int length) throws SAXExceptionDescription copied from interface:PrimitiveTypeContentHandlerReceive 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
.
- Specified by:
longsin interfacePrimitiveTypeContentHandler- Parameters:
l- the array of longstart- the start position in the arraylength- the number of long to read from the array- Throws:
SAXException- any SAX exception, possibly wrapping another exception
-
floats
public void floats(float[] f, int start, int length) throws SAXExceptionDescription copied from interface:PrimitiveTypeContentHandlerReceive 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
.
- Specified by:
floatsin interfacePrimitiveTypeContentHandler- Parameters:
f- the array of floatstart- the start position in the arraylength- the number of float to read from the array- Throws:
SAXException- any SAX exception, possibly wrapping another exception
-
doubles
public void doubles(double[] d, int start, int length) throws SAXExceptionDescription copied from interface:PrimitiveTypeContentHandlerReceive 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
.
- Specified by:
doublesin interfacePrimitiveTypeContentHandler- Parameters:
d- the array of doublestart- the start position in the arraylength- the number of double to read from the array- Throws:
SAXException- any SAX exception, possibly wrapping another exception
-
uuids
public void uuids(long[] msblsb, int start, int length) throws SAXExceptionDescription copied from interface:PrimitiveTypeContentHandlerReceive 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
.
- Specified by:
uuidsin interfacePrimitiveTypeContentHandler- Parameters:
msblsb- the array of long containing pairs of most signficant bits and least significant bits of the UUIDsstart- the start position in the arraylength- the number of long to read from the array. This will be twice the number of UUIDs, which are pairs of two long values- Throws:
SAXException- any SAX exception, possibly wrapping another exception
-
-