Save This Page
Home » openjdk-7 » com.sun.org.apache.xerces.internal » impl » [javadoc | source]
com.sun.org.apache.xerces.internal.impl
public class: XMLEntityScanner [javadoc | source]
java.lang.Object
   com.sun.org.apache.xerces.internal.impl.XMLEntityScanner

All Implemented Interfaces:
    XMLLocator

Direct Known Subclasses:
    XML11EntityScanner

Implements the entity scanner methods.
Field Summary
protected  Entity.ScannedEntity fCurrentEntity     
protected  int fBufferSize     
protected  XMLEntityManager fEntityManager     
public static final  boolean[] VALID_NAMES     
protected  SymbolTable fSymbolTable     
protected  XMLErrorReporter fErrorReporter     
 int[] whiteSpaceLookup     
 int whiteSpaceLen     
 boolean whiteSpaceInfoNeeded     
protected  boolean fAllowJavaEncodings    Allow Java encoding names. This feature identifier is: http://apache.org/xml/features/allow-java-encodings 
protected static final  String SYMBOL_TABLE    Property identifier: symbol table. 
protected static final  String ERROR_REPORTER    Property identifier: error reporter. 
protected static final  String ALLOW_JAVA_ENCODINGS    Feature identifier: allow Java encodings. 
protected  PropertyManager fPropertyManager     
 boolean isExternal     
Constructor:
 public XMLEntityScanner() 
 public XMLEntityScanner(PropertyManager propertyManager,
    XMLEntityManager entityManager) 
    private constructor, this class can only be instantiated within this class. Instance of this class should be obtained using getEntityScanner() or getEntityScanner(ScannedEntity scannedEntity)
    Also see:
    getEntityScanner()
    getEntityScanner(ScannedEntity)
Method from com.sun.org.apache.xerces.internal.impl.XMLEntityScanner Summary:
arrangeCapacity,   arrangeCapacity,   createReader,   getBaseSystemId,   getChar,   getCharacterOffset,   getColumnNumber,   getCurrentEntity,   getEncoding,   getEncodingName,   getExpandedSystemId,   getLineNumber,   getLiteralSystemId,   getPublicId,   getVersion,   getXMLVersion,   isExternal,   isSpace,   load,   peekChar,   print,   registerListener,   reset,   reset,   reset,   scanChar,   scanContent,   scanData,   scanLiteral,   scanName,   scanNmtoken,   scanQName,   setBaseSystemId,   setBufferSize,   setColumnNumber,   setCurrentEntity,   setEncoding,   setExpandedSystemId,   setLineNumber,   setLiteralSystemId,   setPublicId,   setVersion,   setXMLVersion,   skipChar,   skipDeclSpaces,   skipSpaces,   skipString,   skipString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.org.apache.xerces.internal.impl.XMLEntityScanner Detail:
 public boolean arrangeCapacity(int length) throws IOException 
 public boolean arrangeCapacity(int length,
    boolean changeEntity) throws IOException 
 protected Reader createReader(InputStream inputStream,
    String encoding,
    Boolean isBigEndian) throws IOException 
    Creates a reader capable of reading the given input stream in the specified encoding.
 public String getBaseSystemId() 
    Returns the base system identifier of the currently scanned entity, or null if none is available.
 public int getChar(int relative) throws IOException 
 public int getCharacterOffset() 
 public int getColumnNumber() 
 public Entity.ScannedEntity getCurrentEntity() 
 public String getEncoding() 
 protected Object[] getEncodingName(byte[] b4,
    int count) 
    Returns the IANA encoding name that is auto-detected from the bytes specified, with the endian-ness of that encoding where appropriate.
 public String getExpandedSystemId() 
    Returns the expanded system identifier.
 public int getLineNumber() 
 public String getLiteralSystemId() 
    Returns the literal system identifier.
 public String getPublicId() 
    Returns the public identifier.
 public String getVersion() 
 public String getXMLVersion() 
    Returns the XML version of the current entity. This will normally be the value from the XML or text declaration or defaulted by the parser. Note that that this value may be different than the version of the processing rules applied to the current entity. For instance, an XML 1.1 document may refer to XML 1.0 entities. In such a case the rules of XML 1.1 are applied to the entire document. Also note that, for a given entity, this value can only be considered final once the XML or text declaration has been read or once it has been determined that there is no such declaration.
 public boolean isExternal() 
    Returns true if the current entity being scanned is external.
 public boolean isSpace(char ch) 
 final boolean load(int offset,
    boolean changeEntity) throws IOException 
    Loads a chunk of text.
 public int peekChar() throws IOException 
    Returns the next character on the input.

    Note: The character is not consumed.

 final  void print() 
    Prints the contents of the buffer.
 public  void registerListener(XMLBufferListener listener) 
    Registers the listener object and provides callback.
 public  void reset(PropertyManager propertyManager) 
    Resets the components.
 public  void reset(XMLComponentManager componentManager) throws XMLConfigurationException 
    Resets the component. The component can query the component manager about any features and properties that affect the operation of the component.
 public  void reset(SymbolTable symbolTable,
    XMLEntityManager entityManager,
    XMLErrorReporter reporter) 
 public int scanChar() throws IOException 
    Returns the next character on the input.

    Note: The character is consumed.

 public int scanContent(XMLString content) throws IOException 
    CHANGED: Scans a range of parsed character data, This function appends the character data to the supplied buffer.

    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.

 public boolean scanData(String delimiter,
    XMLStringBuffer buffer) throws IOException 
    Scans a range of character data up to the specified delimiter, setting the fields of the XMLString structure, appropriately.

    Note: The characters are consumed.

    Note: This assumes that 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.

 public int scanLiteral(int quote,
    XMLString content) throws 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.

 public String scanName() throws IOException 
    Returns a string matching the Name production appearing immediately on the input as a symbol, or null if no Name string is present.

    Note: The Name characters are consumed.

    Note: The string returned must be a symbol. The SymbolTable can be used for this purpose.

 public String scanNmtoken() throws IOException 
    Returns a string matching the NMTOKEN production appearing immediately on the input as a symbol, or null if NMTOKEN Name string is present.

    Note: The NMTOKEN characters are consumed.

    Note: The string returned must be a symbol. The SymbolTable can be used for this purpose.

 public boolean scanQName(QName qname) throws IOException 
    Scans a qualified name from the input, setting the fields of the QName structure appropriately.

    Note: The qualified name characters are consumed.

    Note: The strings used to set the values of the QName structure must be symbols. The SymbolTable can be used for this purpose.

 public  void setBaseSystemId(String systemId) 
 public  void setBufferSize(int size) 
 public  void setColumnNumber(int col) 
 public  void setCurrentEntity(Entity.ScannedEntity scannedEntity) 
    set the instance of current scanned entity.
 public  void setEncoding(String encoding) throws IOException 
    Sets the encoding of the scanner. This method is used by the scanners if the XMLDecl or TextDecl line contains an encoding pseudo-attribute.

    Note: The underlying character reader on the current entity will be changed to accomodate the new encoding. However, the new encoding is ignored if the current reader was not constructed from an input stream (e.g. an external entity that is resolved directly to the appropriate java.io.Reader object).

 public  void setExpandedSystemId(String systemId) 
 public  void setLineNumber(int line) 
 public  void setLiteralSystemId(String systemId) 
 public  void setPublicId(String publicId) 
 public  void setVersion(String version) 
    the version of the current entity being scanned
  void setXMLVersion(String version) 
 public boolean skipChar(int c) throws IOException 
    Skips a character appearing immediately on the input.

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

 public boolean skipDeclSpaces() throws IOException 
    Skips space characters appearing immediately on the input that would match non-terminal S (0x09, 0x0A, 0x0D, 0x20) before end of line normalization is performed. This is useful when scanning structures such as the XMLDecl and TextDecl that can only contain US-ASCII characters.

    Note: The characters are consumed only if they would match non-terminal S before end of line normalization is performed.

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

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

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

    Note: The characters are consumed only if all the characters are skipped.

 public boolean skipString(char[] s) throws IOException