com.caucho.xml2.readers
Class MacroReader

java.lang.Object
  extended by com.caucho.xml2.readers.XmlReader
      extended by com.caucho.xml2.readers.MacroReader

public class MacroReader
extends XmlReader

A fast reader to convert bytes to characters for parsing XML.


Field Summary
 
Fields inherited from class com.caucho.xml2.readers.XmlReader
_filename, _is, _line, _next, _parser, _publicId, _searchPath, _systemId, isAsciiNameChar
 
Constructor Summary
MacroReader()
          Create a new reader.
 
Method Summary
 void add(char ch)
          Adds a new character to the buffer.
 void add(CharBuffer cb)
          Adds a char buffer to the macro.
 void add(java.lang.String s)
          Adds a string to the macro.
 java.lang.String getFilename()
          Gets the filename.
 int getLine()
          Gets the current line number.
 java.lang.String getPublicId()
          Gets the publicId.
 ReadStream getReadStream()
          Returns the read stream.
 java.lang.String getSystemId()
          Gets the systemId.
 void init(XmlParser parser, XmlReader next)
           
 void prepend(char ch)
           
 int read()
          Read the next character, returning -1 on end of file..
 
Methods inherited from class com.caucho.xml2.readers.XmlReader
finish, getNext, getSearchPath, init, parseName, setFilename, setLine, setNext, setPublicId, setSearchPath, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacroReader

public MacroReader()
Create a new reader.

Method Detail

init

public void init(XmlParser parser,
                 XmlReader next)

getReadStream

public ReadStream getReadStream()
Description copied from class: XmlReader
Returns the read stream.

Overrides:
getReadStream in class XmlReader

getSystemId

public java.lang.String getSystemId()
Description copied from class: XmlReader
Gets the systemId.

Overrides:
getSystemId in class XmlReader

getPublicId

public java.lang.String getPublicId()
Description copied from class: XmlReader
Gets the publicId.

Overrides:
getPublicId in class XmlReader

getFilename

public java.lang.String getFilename()
Description copied from class: XmlReader
Gets the filename.

Overrides:
getFilename in class XmlReader

getLine

public int getLine()
Description copied from class: XmlReader
Gets the current line number.

Overrides:
getLine in class XmlReader

add

public void add(java.lang.String s)
Adds a string to the macro.


add

public void add(CharBuffer cb)
Adds a char buffer to the macro.


add

public void add(char ch)
Adds a new character to the buffer.


prepend

public void prepend(char ch)

read

public int read()
         throws java.io.IOException
Read the next character, returning -1 on end of file..

Overrides:
read in class XmlReader
Throws:
java.io.IOException