APIdia Launch Partner
Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.runtime

public final Class StringValueHandler

extends EmptySerializer
Class Inheritance
Imports
org.xml.sax.SAXException, com.sun.org.apache.xml.internal.serializer.EmptySerializer

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

Modifier and TypeField and Description
private StringBuilder
private int
private String
private static final String
private boolean
Inherited from com.sun.org.apache.xml.internal.serializer.EmptySerializer:
ERR

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
characters(char[] ch, int off, int len)

Overrides com.sun.org.apache.xml.internal.serializer.EmptySerializer.characters.

Implements org.xml.sax.ContentHandler.characters.

Receive notification of character data.

public void
characters(String characters)

Overrides com.sun.org.apache.xml.internal.serializer.EmptySerializer.characters.

Implements com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler.characters.

This method is used to notify of a character event, but passing the data as a character String rather than the standard character array.

public void
public String
public String
getValueOfPI()

The value of a PI must not contain the substring "?>".

public boolean
public void
Inherited from com.sun.org.apache.xml.internal.serializer.EmptySerializer:
addAttributeaddAttributeaddAttributeaddAttributesaddUniqueAttributeaddXSLAttributeasContentHandlerasDOM3SerializerasDOMSerializerattributeDeclcharactersclosecommentcommentcouldThrowIOExceptioncouldThrowSAXExceptioncouldThrowSAXExceptioncouldThrowSAXExceptionelementDeclendCDATAendDocumentendDTDendElementendEntityendPrefixMappingentityReferenceerrorexternalEntityDeclfatalErrorflushPendinggetDoctypePublicgetDoctypeSystemgetEncodinggetIndentgetIndentAmountgetMediaTypegetNamespaceMappingsgetNamespaceURIgetNamespaceURIFromPrefixgetOmitXMLDeclarationgetOutputFormatgetOutputPropertygetOutputPropertyDefaultgetOutputStreamgetPrefixgetStandalonegetTransformergetVersiongetWriterignorableWhitespaceinternalEntityDeclnamespaceAfterStartElementnotationDeclprocessingInstructionresetserializesetCdataSectionElementssetContentHandlersetDoctypesetDoctypePublicsetDoctypeSystemsetDocumentLocatorsetDTDEntityExpansionsetEncodingsetIndentsetIndentAmountsetIsStandalonesetMediaTypesetNamespaceMappingssetOmitXMLDeclarationsetOutputFormatsetOutputPropertysetOutputPropertyDefaultsetOutputStreamsetSourceLocatorsetStandalonesetTransformersetVersionsetWriterskippedEntitystartCDATAstartDocumentstartDTDstartElementstartElementstartEntitystartPrefixMappingstartPrefixMappingunparsedEntityDeclwarning

Field Detail

_bufferback to summary
private StringBuilder _buffer
_nestedLevelback to summary
private int _nestedLevel
_strback to summary
private String _str
EMPTY_STRback to summary
private static final String EMPTY_STR
m_escapingback to summary
private boolean m_escaping

Constructor Detail

StringValueHandlerback to summary
public StringValueHandler()

Method Detail

charactersback to summary
public void characters(char[] ch, int off, int len) throws SAXException

Overrides com.sun.org.apache.xml.internal.serializer.EmptySerializer.characters.

Implements org.xml.sax.ContentHandler.characters.

Doc from org.xml.sax.ContentHandler.characters.

Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.

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

Individual characters may consist of more than one Java char value. There are two important cases where this happens, because characters can't be represented in just sixteen bits. In one case, characters are represented in a Surrogate Pair, using two special Unicode values. Such characters are in the so-called "Astral Planes", with a code point above U+FFFF. A second case involves composite characters, such as a base character combining with one or more accent characters.

Your code should not assume that algorithms using char-at-a-time idioms will be working in character units; in some cases they will split characters. This is relevant wherever XML permits arbitrary characters, such as attribute values, processing instruction data, and comments as well as in data reported from this method. It's also generally relevant whenever Java code manipulates internationalized text; the issue isn't unique to XML.

Note that some parsers will report whitespace in element content using the ignorableWhitespace method rather than this one (validating parsers must do so).

Exceptions
SAXException:
any SAX exception, possibly wrapping another exception
charactersback to summary
public void characters(String characters) throws SAXException

Overrides com.sun.org.apache.xml.internal.serializer.EmptySerializer.characters.

Implements com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler.characters.

Doc from com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler.characters.

This method is used to notify of a character event, but passing the data as a character String rather than the standard character array.

endElementback to summary
public void endElement(String qname) throws SAXException

Overrides com.sun.org.apache.xml.internal.serializer.EmptySerializer.endElement.

Implements com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler.endElement.

Doc from com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler.endElement.

This method is used to notify that an element has ended. Unlike the standard SAX method

endElement(namespaceURI,localName,qName)
only the last parameter is passed. If needed the serializer can derive the localName from the qualified name and derive the namespaceURI from its implementation.
getValueback to summary
public String getValue()
getValueOfPIback to summary
public String getValueOfPI()

The value of a PI must not contain the substring "?>". Should that substring be present, replace it by "? >".

setEscapingback to summary
public boolean setEscaping(boolean bool)

Overrides com.sun.org.apache.xml.internal.serializer.EmptySerializer.setEscaping.

Implements com.sun.org.apache.xml.internal.serializer.SerializationHandler.setEscaping.

Doc from com.sun.org.apache.xml.internal.serializer.SerializationHandler.setEscaping.

Turns special character escaping on/off. Note that characters will never, even if this option is set to 'true', be escaped within CDATA sections in output XML documents.

startElementback to summary
public void startElement(String qname) throws SAXException

Overrides com.sun.org.apache.xml.internal.serializer.EmptySerializer.startElement.

Implements com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler.startElement.

Doc from com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler.startElement.

This method is used to notify of the start of an element