Package com.sun.xml.rpc.sp
Class StreamingParserFactoryImpl
- java.lang.Object
-
- com.sun.xml.rpc.sp.StreamingParserFactory
-
- com.sun.xml.rpc.sp.StreamingParserFactoryImpl
-
public class StreamingParserFactoryImpl extends StreamingParserFactory
Implementation of the factory class for creating demand-driven parsers.- Author:
- Zhenghua Li, JAX-RPC RI Development Team
-
-
Constructor Summary
Constructors Constructor Description StreamingParserFactoryImpl()The constructor is made public now to allow access from javax.xml.marshal.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisCoalescing()Returns the coalescing property of this factory.booleanisNamespaceAware()Returns the namespaceAware property of this factory.booleanisValidating()Returns the validating property of this factory.StreamingParsernewParser(File file)Creates a new demand-driven parser that reads from the given file.StreamingParsernewParser(InputStream in)Creates a new parser instance that reads from the given input stream.voidsetCoalescing(boolean coalescing)Sets the coalescing property of this factory.voidsetNamespaceAware(boolean namespaceAware)Sets the namespaceAware property of this factory.voidsetValidating(boolean validating)Sets the validating property of this factory.-
Methods inherited from class com.sun.xml.rpc.sp.StreamingParserFactory
newInstance
-
-
-
-
Method Detail
-
setValidating
public void setValidating(boolean validating)
Sets the validating property of this factory.- Specified by:
setValidatingin classStreamingParserFactory- Parameters:
validating- Parsers henceforth created by this factory will perform validation if, and only if, this parameter is true- Throws:
UnsupportedOperationException- If the parser implementation does not support the requested value
-
isValidating
public boolean isValidating()
Returns the validating property of this factory.- Specified by:
isValidatingin classStreamingParserFactory- Returns:
- true if, and only if, all parsers henceforth created by this factory will perform validation
-
setCoalescing
public void setCoalescing(boolean coalescing)
Sets the coalescing property of this factory. If coalescing is enabled then the parser will always coalesce adjacent runs of character data, i.e., theStreamingParser.CHARSstate will never occur more than once in sequence.- Specified by:
setCoalescingin classStreamingParserFactory- Parameters:
coalescing- Parsers henceforth created by this factory will coalesce character data if, and only if, this parameter is true- Throws:
UnsupportedOperationException- If the parser implementation does not support the requested value
-
isCoalescing
public boolean isCoalescing()
Returns the coalescing property of this factory.- Specified by:
isCoalescingin classStreamingParserFactory- Returns:
- true if, and only if, all parsers henceforth created by this factory will coalesce adjacent runs of character data
-
setNamespaceAware
public void setNamespaceAware(boolean namespaceAware)
Sets the namespaceAware property of this factory.- Specified by:
setNamespaceAwarein classStreamingParserFactory- Parameters:
namespaceAware- Parsers henceforth created by this factory will support namespace if, and only if, this parameter is true- Throws:
UnsupportedOperationException- If the parser implementation does not support the requested value
-
isNamespaceAware
public boolean isNamespaceAware()
Returns the namespaceAware property of this factory.- Specified by:
isNamespaceAwarein classStreamingParserFactory- Returns:
- true if, and only if, all parsers henceforth created by this factory will support namespace
-
newParser
public StreamingParser newParser(InputStream in)
Creates a new parser instance that reads from the given input stream. No parsing is done by this method; theparsemethod of the resulting parser must be invoked to parse the initial component of the input document.- Specified by:
newParserin classStreamingParserFactory- Parameters:
in- The input stream from which the XML document will be read
-
newParser
public StreamingParser newParser(File file) throws IOException
Creates a new demand-driven parser that reads from the given file. No parsing is done by this constructor; theparsemethod must be invoked to parse the initial component of the given document.- Specified by:
newParserin classStreamingParserFactory- Parameters:
file- The file from which the XML document will be read- Throws:
IOException- If an I/O error occurs
-
-