com.thaiopensource.relaxng.parse.compact
Class UCode_UCodeESC_CharStream

java.lang.Object
  extended by com.thaiopensource.relaxng.parse.compact.UCode_UCodeESC_CharStream

public final class UCode_UCodeESC_CharStream
extends Object

An implementation of interface CharStream, where the stream is assumed to contain 16-bit unicode characters.


Field Summary
(package private)  int available
           
private static char BOM
           
private  int[] bufcolumn
           
private  char[] buffer
           
private  int[] bufline
           
 int bufpos
           
(package private)  int bufsize
           
private  boolean closed
           
private  int column
           
private  int inBuf
           
private  Reader inputStream
           
private  int line
           
private  int maxNextCharInd
           
private  char NEWLINE_MARKER
           
private  char[] nextCharBuf
           
private  int nextCharInd
           
private  boolean prevCharIsLF
           
static boolean staticFlag
           
(package private)  int tokenBegin
           
 
Constructor Summary
UCode_UCodeESC_CharStream(InputStream dstream, int startline, int startcolumn)
           
UCode_UCodeESC_CharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
           
UCode_UCodeESC_CharStream(Reader dstream, int startline, int startcolumn)
           
UCode_UCodeESC_CharStream(Reader dstream, int startline, int startcolumn, int buffersize)
           
 
Method Summary
 void adjustBeginLineColumn(int newLine, int newCol)
          Method to adjust line and column numbers for the start of a token.
private  void AdjustBuffSize()
           
 void backup(int amount)
           
 char BeginToken()
           
 void Done()
           
private  void ExpandBuff(boolean wrapAround)
           
private  void FillBuff()
           
 int getBeginColumn()
           
 int getBeginLine()
           
 int getColumn()
          Deprecated.  
 int getEndColumn()
           
 int getEndLine()
           
 String GetImage()
           
 int getLine()
          Deprecated.  
 char[] GetSuffix(int len)
           
(package private) static int hexval(char c)
           
private  char PeekChar()
           
 char readChar()
           
private  char ReadChar()
           
 void ReInit(InputStream dstream, int startline, int startcolumn)
           
 void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
           
 void ReInit(Reader dstream, int startline, int startcolumn)
           
 void ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
           
private  void skipBOM()
           
private  void UpdateLineColumn(char c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

staticFlag

public static final boolean staticFlag
See Also:
Constant Field Values

bufpos

public int bufpos

bufsize

int bufsize

available

int available

tokenBegin

int tokenBegin

bufline

private int[] bufline

bufcolumn

private int[] bufcolumn

column

private int column

line

private int line

inputStream

private Reader inputStream

closed

private boolean closed

prevCharIsLF

private boolean prevCharIsLF

nextCharBuf

private char[] nextCharBuf

buffer

private char[] buffer

maxNextCharInd

private int maxNextCharInd

nextCharInd

private int nextCharInd

inBuf

private int inBuf

NEWLINE_MARKER

private final char NEWLINE_MARKER
See Also:
Constant Field Values

BOM

private static final char BOM
See Also:
Constant Field Values
Constructor Detail

UCode_UCodeESC_CharStream

public UCode_UCodeESC_CharStream(Reader dstream,
                                 int startline,
                                 int startcolumn,
                                 int buffersize)

UCode_UCodeESC_CharStream

public UCode_UCodeESC_CharStream(Reader dstream,
                                 int startline,
                                 int startcolumn)

UCode_UCodeESC_CharStream

public UCode_UCodeESC_CharStream(InputStream dstream,
                                 int startline,
                                 int startcolumn,
                                 int buffersize)

UCode_UCodeESC_CharStream

public UCode_UCodeESC_CharStream(InputStream dstream,
                                 int startline,
                                 int startcolumn)
Method Detail

hexval

static final int hexval(char c)

ExpandBuff

private final void ExpandBuff(boolean wrapAround)

FillBuff

private final void FillBuff()
                     throws EOFException
Throws:
EOFException

ReadChar

private final char ReadChar()
                     throws EOFException
Throws:
EOFException

PeekChar

private final char PeekChar()
                     throws EOFException
Throws:
EOFException

BeginToken

public final char BeginToken()
                      throws EOFException
Throws:
EOFException

AdjustBuffSize

private final void AdjustBuffSize()

UpdateLineColumn

private final void UpdateLineColumn(char c)

readChar

public final char readChar()
                    throws EOFException
Throws:
EOFException

getColumn

public final int getColumn()
Deprecated. 

See Also:
getEndColumn()

getLine

public final int getLine()
Deprecated. 

See Also:
getEndLine()

getEndColumn

public final int getEndColumn()

getEndLine

public final int getEndLine()

getBeginColumn

public final int getBeginColumn()

getBeginLine

public final int getBeginLine()

backup

public final void backup(int amount)

ReInit

public void ReInit(Reader dstream,
                   int startline,
                   int startcolumn,
                   int buffersize)

ReInit

public void ReInit(Reader dstream,
                   int startline,
                   int startcolumn)

ReInit

public void ReInit(InputStream dstream,
                   int startline,
                   int startcolumn,
                   int buffersize)

ReInit

public void ReInit(InputStream dstream,
                   int startline,
                   int startcolumn)

skipBOM

private void skipBOM()

GetImage

public final String GetImage()

GetSuffix

public final char[] GetSuffix(int len)

Done

public void Done()

adjustBeginLineColumn

public void adjustBeginLineColumn(int newLine,
                                  int newCol)
Method to adjust line and column numbers for the start of a token.