org.apache.el.parser

Class SimpleCharStream

public class SimpleCharStream extends Object

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
Field Summary
protected int[]bufcolumn
protected char[]buffer
protected int[]bufline
intbufpos
Position in buffer.
protected intcolumn
protected intinBuf
protected ReaderinputStream
protected intline
protected intmaxNextCharInd
protected booleanprevCharIsCR
protected booleanprevCharIsLF
static booleanstaticFlag
Whether parser is static.
protected inttabSize
Constructor Summary
SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
Constructor.
SimpleCharStream(Reader dstream, int startline, int startcolumn)
Constructor.
SimpleCharStream(Reader dstream)
Constructor.
SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Constructor.
SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
Constructor.
SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)
Constructor.
SimpleCharStream(InputStream dstream, int startline, int startcolumn)
Constructor.
SimpleCharStream(InputStream dstream, String encoding)
Constructor.
SimpleCharStream(InputStream dstream)
Constructor.
Method Summary
voidadjustBeginLineColumn(int newLine, int newCol)
Method to adjust line and column numbers for the start of a token.
voidbackup(int amount)
Backup a number of characters.
charBeginToken()
Start.
voidDone()
Reset buffer when finished.
protected voidExpandBuff(boolean wrapAround)
protected voidFillBuff()
intgetBeginColumn()
Get token beginning column number.
intgetBeginLine()
Get token beginning line number.
intgetEndColumn()
Get token end column number.
intgetEndLine()
Get token end line number.
protected intgetTabSize(int i)
StringGetImage()
Get token literal value.
char[]GetSuffix(int len)
Get the suffix.
charreadChar()
Read a character.
voidReInit(Reader dstream, int startline, int startcolumn, int buffersize)
Reinitialise.
voidReInit(Reader dstream, int startline, int startcolumn)
Reinitialise.
voidReInit(Reader dstream)
Reinitialise.
voidReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Reinitialise.
voidReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
Reinitialise.
voidReInit(InputStream dstream, String encoding)
Reinitialise.
voidReInit(InputStream dstream)
Reinitialise.
voidReInit(InputStream dstream, String encoding, int startline, int startcolumn)
Reinitialise.
voidReInit(InputStream dstream, int startline, int startcolumn)
Reinitialise.
protected voidsetTabSize(int i)
protected voidUpdateLineColumn(char c)

Field Detail

bufcolumn

protected int[] bufcolumn

buffer

protected char[] buffer

bufline

protected int[] bufline

bufpos

public int bufpos
Position in buffer.

column

protected int column

inBuf

protected int inBuf

inputStream

protected Reader inputStream

line

protected int line

maxNextCharInd

protected int maxNextCharInd

prevCharIsCR

protected boolean prevCharIsCR

prevCharIsLF

protected boolean prevCharIsLF

staticFlag

public static final boolean staticFlag
Whether parser is static.

tabSize

protected int tabSize

Constructor Detail

SimpleCharStream

public SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
Constructor.

SimpleCharStream

public SimpleCharStream(Reader dstream, int startline, int startcolumn)
Constructor.

SimpleCharStream

public SimpleCharStream(Reader dstream)
Constructor.

SimpleCharStream

public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Constructor.

SimpleCharStream

public SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
Constructor.

SimpleCharStream

public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)
Constructor.

SimpleCharStream

public SimpleCharStream(InputStream dstream, int startline, int startcolumn)
Constructor.

SimpleCharStream

public SimpleCharStream(InputStream dstream, String encoding)
Constructor.

SimpleCharStream

public SimpleCharStream(InputStream dstream)
Constructor.

Method Detail

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)
Backup a number of characters.

BeginToken

public char BeginToken()
Start.

Done

public void Done()
Reset buffer when finished.

ExpandBuff

protected void ExpandBuff(boolean wrapAround)

FillBuff

protected void FillBuff()

getBeginColumn

public int getBeginColumn()
Get token beginning column number.

getBeginLine

public int getBeginLine()
Get token beginning line number.

getEndColumn

public int getEndColumn()
Get token end column number.

getEndLine

public int getEndLine()
Get token end line number.

getTabSize

protected int getTabSize(int i)

GetImage

public String GetImage()
Get token literal value.

GetSuffix

public char[] GetSuffix(int len)
Get the suffix.

readChar

public char readChar()
Read a character.

ReInit

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

ReInit

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

ReInit

public void ReInit(Reader dstream)
Reinitialise.

ReInit

public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Reinitialise.

ReInit

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

ReInit

public void ReInit(InputStream dstream, String encoding)
Reinitialise.

ReInit

public void ReInit(InputStream dstream)
Reinitialise.

ReInit

public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn)
Reinitialise.

ReInit

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

setTabSize

protected void setTabSize(int i)

UpdateLineColumn

protected void UpdateLineColumn(char c)
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.