org.apache.batik.xml
public class XMLUtilities extends XMLCharacters
Constructor Summary | |
---|---|
protected | XMLUtilities()
This class does not need to be instantiated. |
Method Summary | |
---|---|
protected static Reader | createXMLDeclarationReader(PushbackInputStream pbis, String enc)
Creates a reader from the given input stream and encoding.
|
static Reader | createXMLDocumentReader(InputStream is)
Creates a Reader initialized to scan the characters in the given
XML document's InputStream. |
static String | encodingToJavaEncoding(String e, String de)
Converts the given standard encoding representation to the
corresponding Java encoding string. |
protected static String | getXMLDeclarationEncoding(Reader r, String e)
Reads an XML declaration to get the encoding declaration value. |
static boolean | isXML11Character(int c)
Tests whether the given 32 bit character is a valid XML 1.1 character. |
static boolean | isXML11NameCharacter(char c)
Tests whether the given character is a valid XML 1.1 name character. |
static boolean | isXML11NameFirstCharacter(char c)
Tests whether the given character is usable as the
first character of an XML 1.1 name. |
static boolean | isXMLAlphabeticCharacter(char c)
Tests whether the given character is a valid aphabetic character. |
static boolean | isXMLCharacter(int c)
Tests whether the given 32 bits character is valid in XML documents. |
static boolean | isXMLNameCharacter(char c)
Tests whether the given character is a valid XML name character. |
static boolean | isXMLNameFirstCharacter(char c)
Tests whether the given character is usable as the
first character of an XML name. |
static boolean | isXMLPublicIdCharacter(char c)
Tests whether the given character is a valid XML public ID character. |
static boolean | isXMLSpace(char c)
Tests whether the given character is a valid space. |
static boolean | isXMLVersionCharacter(char c)
Tests whether the given character is a valid XML version character. |
Parameters: is The input stream positionned at the beginning of an XML document.
Returns: a Reader positionned at the beginning of the XML document It is created from an encoding figured out from the first few bytes of the document. As a consequence the given input stream is not positionned anymore at the beginning of the document when this method returns.
Parameters: e the encoding string to convert. de the encoding string if no corresponding encoding was found.
Parameters: r a reader positioned just after '<?xm'. e the encoding to return by default or on error.