com.bluecast.xml

Class XMLInputReader

Known Direct Subclasses:
XMLReaderReader, XMLStreamReader

public abstract class XMLInputReader
extends Reader

A Reader for XML documents the proper character set to use based on Byte Order Marks and XML declarations.
Version:
$Revision: 1.3 $
Author:
Yuval Oren, yuval@bluecast.com

Method Summary

String
getXMLDeclaredEncoding()
Gets the declared encoding from the XML declaration, or null if no value was found.
String
getXMLVersion()
Gets the version string from the XML declaration, or null.
boolean
isXMLStandalone()
Returns the Standalone value from the XML declaration.
boolean
isXMLStandaloneDeclared()
Returns true if an XML "standalone" declaration was found.
protected int
parseXMLDeclaration(char[] cbuf, int offset, int length)
Call this to parse the XML declaration.
protected void
resetInput()

Method Details

getXMLDeclaredEncoding

public String getXMLDeclaredEncoding()
Gets the declared encoding from the XML declaration, or null if no value was found.

getXMLVersion

public String getXMLVersion()
Gets the version string from the XML declaration, or null.

isXMLStandalone

public boolean isXMLStandalone()
Returns the Standalone value from the XML declaration. Defaults to false if no value was declared.

isXMLStandaloneDeclared

public boolean isXMLStandaloneDeclared()
Returns true if an XML "standalone" declaration was found.

parseXMLDeclaration

protected int parseXMLDeclaration(char[] cbuf,
                                  int offset,
                                  int length)
            throws IOException
Call this to parse the XML declaration. Returns the number of characters used by the declaration, or zero if no declaration was found.

resetInput

protected void resetInput()