bsh

Class JavaCharStream

public class JavaCharStream extends Object

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode escape processing).
Field Summary
protected int[]bufcolumn
protected char[]buffer
protected int[]bufline
intbufpos
protected intcolumn
protected intinBuf
protected ReaderinputStream
protected intline
protected intmaxNextCharInd
protected char[]nextCharBuf
protected intnextCharInd
protected booleanprevCharIsCR
protected booleanprevCharIsLF
static booleanstaticFlag
Constructor Summary
JavaCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
JavaCharStream(Reader dstream, int startline, int startcolumn)
JavaCharStream(Reader dstream)
JavaCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
JavaCharStream(InputStream dstream, int startline, int startcolumn)
JavaCharStream(InputStream dstream)
Method Summary
protected voidAdjustBuffSize()
voidadjustBeginLineColumn(int newLine, int newCol)
Method to adjust line and column numbers for the start of a token.
voidbackup(int amount)
charBeginToken()
voidDone()
protected voidExpandBuff(boolean wrapAround)
protected voidFillBuff()
intgetBeginColumn()
intgetBeginLine()
intgetColumn()
intgetEndColumn()
intgetEndLine()
intgetLine()
StringGetImage()
char[]GetSuffix(int len)
charreadChar()
protected charReadByte()
voidReInit(Reader dstream, int startline, int startcolumn, int buffersize)
voidReInit(Reader dstream, int startline, int startcolumn)
voidReInit(Reader dstream)
voidReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
voidReInit(InputStream dstream, int startline, int startcolumn)
voidReInit(InputStream dstream)
protected voidUpdateLineColumn(char c)

Field Detail

bufcolumn

protected int[] bufcolumn

buffer

protected char[] buffer

bufline

protected int[] bufline

bufpos

public int bufpos

column

protected int column

inBuf

protected int inBuf

inputStream

protected Reader inputStream

line

protected int line

maxNextCharInd

protected int maxNextCharInd

nextCharBuf

protected char[] nextCharBuf

nextCharInd

protected int nextCharInd

prevCharIsCR

protected boolean prevCharIsCR

prevCharIsLF

protected boolean prevCharIsLF

staticFlag

public static final boolean staticFlag

Constructor Detail

JavaCharStream

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

JavaCharStream

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

JavaCharStream

public JavaCharStream(Reader dstream)

JavaCharStream

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

JavaCharStream

public JavaCharStream(InputStream dstream, int startline, int startcolumn)

JavaCharStream

public JavaCharStream(InputStream dstream)

Method Detail

AdjustBuffSize

protected void AdjustBuffSize()

adjustBeginLineColumn

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

backup

public void backup(int amount)

BeginToken

public char BeginToken()

Done

public void Done()

ExpandBuff

protected void ExpandBuff(boolean wrapAround)

FillBuff

protected void FillBuff()

getBeginColumn

public int getBeginColumn()

getBeginLine

public int getBeginLine()

getColumn

public int getColumn()

Deprecated:

See Also: JavaCharStream

getEndColumn

public int getEndColumn()

getEndLine

public int getEndLine()

getLine

public int getLine()

Deprecated:

See Also: JavaCharStream

GetImage

public String GetImage()

GetSuffix

public char[] GetSuffix(int len)

readChar

public char readChar()

ReadByte

protected char ReadByte()

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(Reader dstream)

ReInit

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

ReInit

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

ReInit

public void ReInit(InputStream dstream)

UpdateLineColumn

protected void UpdateLineColumn(char c)
B) 2000 pat@pat.net :-)