Package com.sun.xml.rpc.sp
Class StreamingParserImpl
java.lang.Object
com.sun.xml.rpc.sp.StreamingParser
com.sun.xml.rpc.sp.StreamingParserImpl
A demand-driven streaming parser implementation.
- Author:
- Zhenghua Li, JAX-RPC RI Development Team
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionintcolumn()Returns the column number of the current component, or -1 if the column number is not known.describe(boolean articleNeeded) Constructs a string describing the current state of this parser, suitable for use in an error message or an exception detail string.booleanReturns the coalescing property of this parser.booleanReturns the namespaceAware property of this parser.booleanReturns the validating property of this parser.intline()Returns the line number of the current component, or -1 if the line number is not known.name()Returns a name string whose meaning depends upon the current state.intparse()Parses the next component of the document being parsed.publicId()Returns the public identifer of the document being parsed, or null if it has none.intstate()Returns the current state of the parser.systemId()Returns the system identifer of the document being parsed, or null if it has none.Returns the URI string of the current component.value()Returns a value string whose meaning depends upon the current state.Methods inherited from class com.sun.xml.rpc.sp.StreamingParser
describe, toString
-
Method Details
-
parse
Parses the next component of the document being parsed.- Specified by:
parsein classStreamingParser- Returns:
- The parser's current state, one of
StreamingParser.START,StreamingParser.END,StreamingParser.ATTR,StreamingParser.CHARS,StreamingParser.IWS, orStreamingParser.PI, or -1 if the end of the document has been reached - Throws:
ParseException- If an XML parsing error occursIOException- If an I/O error occurs
-
state
public int state()Returns the current state of the parser.- Specified by:
statein classStreamingParser- Returns:
- The parser's current state, one of
StreamingParser.START,StreamingParser.END,StreamingParser.ATTR,StreamingParser.CHARS,StreamingParser.IWS, orStreamingParser.PI, or -1 if the end of the document has been reached. - Throws:
IllegalStateException- If the parser has yet not been started by invoking theparse()method
-
name
Returns a name string whose meaning depends upon the current state.- Specified by:
namein classStreamingParser- Throws:
IllegalStateException- If there is no name data for the current parser state
-
value
Returns a value string whose meaning depends upon the current state.- Specified by:
valuein classStreamingParser- Throws:
IllegalStateException- If there is no value data for the current parser state
-
uriString
Returns the URI string of the current component.- Specified by:
uriStringin classStreamingParser- Throws:
IllegalStateException- If there is no URI for the current component
-
line
public int line()Returns the line number of the current component, or -1 if the line number is not known.- Specified by:
linein classStreamingParser
-
column
public int column()Returns the column number of the current component, or -1 if the column number is not known.- Specified by:
columnin classStreamingParser
-
publicId
Returns the public identifer of the document being parsed, or null if it has none.- Specified by:
publicIdin classStreamingParser
-
systemId
Returns the system identifer of the document being parsed, or null if it has none.- Specified by:
systemIdin classStreamingParser
-
isValidating
public boolean isValidating()Returns the validating property of this parser.- Specified by:
isValidatingin classStreamingParser- Returns:
- true if, and only if, this parser will perform validation
-
isCoalescing
public boolean isCoalescing()Returns the coalescing property of this parser.- Specified by:
isCoalescingin classStreamingParser- Returns:
- true if, and only if, this parser will coalesce adjacent runs of character data
-
isNamespaceAware
public boolean isNamespaceAware()Returns the namespaceAware property of this parser.- Specified by:
isNamespaceAwarein classStreamingParser- Returns:
- true if, and only if, this parser will support namespace
-
describe
Constructs a string describing the current state of this parser, suitable for use in an error message or an exception detail string.- Specified by:
describein classStreamingParser- Parameters:
articleNeeded- Whether an appropriate article ("a", "an", "some", or "the") is to be prepended to the description string- Returns:
- A string describing the given parser state.
-