BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.apache.xerces.impl
Class XML11EntityManager.XML11EntityScanner

java.lang.Object
  |
  +--weblogic.apache.xerces.impl.XMLEntityScanner
        |
        +--weblogic.apache.xerces.impl.XMLEntityManager.EntityScanner
              |
              +--weblogic.apache.xerces.impl.XML11EntityManager.XML11EntityScanner

protected class XML11EntityManager.XML11EntityScanner
extends XMLEntityManager.EntityScanner

Implements the entity scanner methods.


Constructor Summary
XML11EntityManager.XML11EntityScanner()
          Default constructor.
 
Method Summary
 int peekChar()
          Returns the next character on the input.
 int scanChar()
          Returns the next character on the input.
 int scanContent(XMLString content)
          Scans a range of parsed character data, setting the fields of the XMLString structure, appropriately.
 boolean scanData(java.lang.String delimiter, XMLString data)
          Scans a range of character data up to the specicied delimiter, setting the fields of the XMLString structure, appropriately.
 int scanLiteral(int quote, XMLString content)
          Scans a range of attribute value data, setting the fields of the XMLString structure, appropriately.
 boolean skipChar(int c)
          Skips a character appearing immediately on the input.
 boolean skipSpaces()
          Skips space characters appearing immediately on the input.
 boolean skipString(java.lang.String s)
          Skips the specified string appearing immediately on the input.
 
Methods inherited from class weblogic.apache.xerces.impl.XMLEntityManager.EntityScanner
getBaseSystemId, getColumnNumber, getExpandedSystemId, getLineNumber, getLiteralSystemId, getPublicId, isExternal, scanName, scanNmtoken, scanQName, setEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XML11EntityManager.XML11EntityScanner

public XML11EntityManager.XML11EntityScanner()
Default constructor.
Method Detail

peekChar

public int peekChar()
             throws java.io.IOException
Returns the next character on the input.

Note: The character is not consumed.

Throws:
java.io.IOException - Thrown if i/o error occurs.
java.io.EOFException - Thrown on end of file.
Overrides:
peekChar in class XMLEntityManager.EntityScanner

scanChar

public int scanChar()
             throws java.io.IOException
Returns the next character on the input.

Note: The character is consumed.

Throws:
java.io.IOException - Thrown if i/o error occurs.
java.io.EOFException - Thrown on end of file.
Overrides:
scanChar in class XMLEntityManager.EntityScanner

scanContent

public int scanContent(XMLString content)
                throws java.io.IOException
Scans a range of parsed character data, setting the fields of the XMLString structure, appropriately.

Note: The characters are consumed.

Note: This method does not guarantee to return the longest run of parsed character data. This method may return before markup due to reaching the end of the input buffer or any other reason.

Note: The fields contained in the XMLString structure are not guaranteed to remain valid upon subsequent calls to the entity scanner. Therefore, the caller is responsible for immediately using the returned character data or making a copy of the character data.

Parameters:
content - The content structure to fill.
Returns:
Returns the next character on the input, if known. This value may be -1 but this does note designate end of file.
Throws:
java.io.IOException - Thrown if i/o error occurs.
java.io.EOFException - Thrown on end of file.
Overrides:
scanContent in class XMLEntityManager.EntityScanner

scanLiteral

public int scanLiteral(int quote,
                       XMLString content)
                throws java.io.IOException
Scans a range of attribute value data, setting the fields of the XMLString structure, appropriately.

Note: The characters are consumed.

Note: This method does not guarantee to return the longest run of attribute value data. This method may return before the quote character due to reaching the end of the input buffer or any other reason.

Note: The fields contained in the XMLString structure are not guaranteed to remain valid upon subsequent calls to the entity scanner. Therefore, the caller is responsible for immediately using the returned character data or making a copy of the character data.

Parameters:
quote - The quote character that signifies the end of the attribute value data.
content - The content structure to fill.
Returns:
Returns the next character on the input, if known. This value may be -1 but this does note designate end of file.
Throws:
java.io.IOException - Thrown if i/o error occurs.
java.io.EOFException - Thrown on end of file.
Overrides:
scanLiteral in class XMLEntityManager.EntityScanner

scanData

public boolean scanData(java.lang.String delimiter,
                        XMLString data)
                 throws java.io.IOException
Scans a range of character data up to the specicied delimiter, setting the fields of the XMLString structure, appropriately.

Note: The characters are consumed.

Note: This assumes that the internal buffer is at least the same size, or bigger, than the length of the delimiter and that the delimiter contains at least one character.

Note: This method does not guarantee to return the longest run of character data. This method may return before the delimiter due to reaching the end of the input buffer or any other reason.

Note: The fields contained in the XMLString structure are not guaranteed to remain valid upon subsequent calls to the entity scanner. Therefore, the caller is responsible for immediately using the returned character data or making a copy of the character data.

Parameters:
delimiter - The string that signifies the end of the character data to be scanned.
data - The data structure to fill.
Returns:
Returns true if there is more data to scan, false otherwise.
Throws:
java.io.IOException - Thrown if i/o error occurs.
java.io.EOFException - Thrown on end of file.
Overrides:
scanData in class XMLEntityManager.EntityScanner

skipChar

public boolean skipChar(int c)
                 throws java.io.IOException
Skips a character appearing immediately on the input.

Note: The character is consumed only if it matches the specified character.

Parameters:
c - The character to skip.
Returns:
Returns true if the character was skipped.
Throws:
java.io.IOException - Thrown if i/o error occurs.
java.io.EOFException - Thrown on end of file.
Overrides:
skipChar in class XMLEntityManager.EntityScanner

skipSpaces

public boolean skipSpaces()
                   throws java.io.IOException
Skips space characters appearing immediately on the input.

Note: The characters are consumed only if they are space characters.

Returns:
Returns true if at least one space character was skipped.
Throws:
java.io.IOException - Thrown if i/o error occurs.
java.io.EOFException - Thrown on end of file.
Overrides:
skipSpaces in class XMLEntityManager.EntityScanner
See Also:
XMLChar.isSpace(int)

skipString

public boolean skipString(java.lang.String s)
                   throws java.io.IOException
Skips the specified string appearing immediately on the input.

Note: The characters are consumed only if they are space characters.

Parameters:
s - The string to skip.
Returns:
Returns true if the string was skipped.
Throws:
java.io.IOException - Thrown if i/o error occurs.
java.io.EOFException - Thrown on end of file.
Overrides:
skipString in class XMLEntityManager.EntityScanner

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81