public class

SimpleCharStream

extends Object
java.lang.Object
   ↳ org.mule.module.netsuite.api.model.expression.filter.parser.SimpleCharStream

Class Overview

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).

Summary

Constants
boolean staticFlag Whether parser is static.
Fields
int available
protected int[] bufcolumn
protected char[] buffer
protected int[] bufline
public int bufpos Position in buffer.
int bufsize
protected int column
protected int inBuf
protected Reader inputStream
protected int line
protected int maxNextCharInd
protected boolean prevCharIsCR
protected boolean prevCharIsLF
protected int tabSize
int tokenBegin
Public Constructors
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.
Public Methods
char BeginToken()
Start.
void Done()
Reset buffer when finished.
String GetImage()
Get token literal value.
char[] GetSuffix(int len)
Get the suffix.
void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Reinitialise.
void ReInit(InputStream dstream, int startline, int startcolumn)
Reinitialise.
void ReInit(InputStream dstream)
Reinitialise.
void ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
Reinitialise.
void ReInit(InputStream dstream, String encoding, int startline, int startcolumn)
Reinitialise.
void ReInit(InputStream dstream, String encoding)
Reinitialise.
void ReInit(Reader dstream)
Reinitialise.
void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
Reinitialise.
void ReInit(Reader dstream, int startline, int startcolumn)
Reinitialise.
void adjustBeginLineColumn(int newLine, int newCol)
Method to adjust line and column numbers for the start of a token.
void backup(int amount)
Backup a number of characters.
int getBeginColumn()
Get token beginning column number.
int getBeginLine()
Get token beginning line number.
int getColumn()
int getEndColumn()
Get token end column number.
int getEndLine()
Get token end line number.
int getLine()
char readChar()
Read a character.
Protected Methods
void ExpandBuff(boolean wrapAround)
void FillBuff()
void UpdateLineColumn(char c)
int getTabSize(int i)
void setTabSize(int i)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final boolean staticFlag

Whether parser is static.

Constant Value: false

Fields

int available

protected int[] bufcolumn

protected char[] buffer

protected int[] bufline

public int bufpos

Position in buffer.

int bufsize

protected int column

protected int inBuf

protected Reader inputStream

protected int line

protected int maxNextCharInd

protected boolean prevCharIsCR

protected boolean prevCharIsLF

protected int tabSize

int tokenBegin

Public Constructors

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

Constructor.

Parameters
dstream
startline
startcolumn
buffersize

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

Constructor.

Parameters
dstream
startline
startcolumn

public SimpleCharStream (Reader dstream)

Constructor.

Parameters
dstream

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

Constructor.

Parameters
dstream
encoding
startline
startcolumn
buffersize
Throws
UnsupportedEncodingException

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

Constructor.

Parameters
dstream
startline
startcolumn
buffersize

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

Constructor.

Parameters
dstream
encoding
startline
startcolumn
Throws
UnsupportedEncodingException

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

Constructor.

Parameters
dstream
startline
startcolumn

public SimpleCharStream (InputStream dstream, String encoding)

Constructor.

Parameters
dstream
encoding
Throws
UnsupportedEncodingException

public SimpleCharStream (InputStream dstream)

Constructor.

Parameters
dstream

Public Methods

public char BeginToken ()

Start.

Throws
IOException

public void Done ()

Reset buffer when finished.

public String GetImage ()

Get token literal value.

public char[] GetSuffix (int len)

Get the suffix.

Parameters
len

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

Reinitialise.

Parameters
dstream
encoding
startline
startcolumn
buffersize
Throws
UnsupportedEncodingException

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

Reinitialise.

Parameters
dstream
startline
startcolumn

public void ReInit (InputStream dstream)

Reinitialise.

Parameters
dstream

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

Reinitialise.

Parameters
dstream
startline
startcolumn
buffersize

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

Reinitialise.

Parameters
dstream
encoding
startline
startcolumn
Throws
UnsupportedEncodingException

public void ReInit (InputStream dstream, String encoding)

Reinitialise.

Parameters
dstream
encoding
Throws
UnsupportedEncodingException

public void ReInit (Reader dstream)

Reinitialise.

Parameters
dstream

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

Reinitialise.

Parameters
dstream
startline
startcolumn
buffersize

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

Reinitialise.

Parameters
dstream
startline
startcolumn

public void adjustBeginLineColumn (int newLine, int newCol)

Method to adjust line and column numbers for the start of a token.

Parameters
newLine
newCol

public void backup (int amount)

Backup a number of characters.

Parameters
amount

public int getBeginColumn ()

Get token beginning column number.

public int getBeginLine ()

Get token beginning line number.

public int getColumn ()

public int getEndColumn ()

Get token end column number.

public int getEndLine ()

Get token end line number.

public int getLine ()

public char readChar ()

Read a character.

Throws
IOException

Protected Methods

protected void ExpandBuff (boolean wrapAround)

Parameters
wrapAround

protected void FillBuff ()

Throws
IOException

protected void UpdateLineColumn (char c)

Parameters
c

protected int getTabSize (int i)

Parameters
i

protected void setTabSize (int i)

Parameters
i