APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.tools.example.debug.expr

public Class JavaCharStream

extends Object
Class Inheritance

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode escape processing).

Field Summary

Modifier and TypeField and Description
pack-priv int
protected int[]
protected char[]
protected int[]
public int
bufpos

Position in buffer.

pack-priv int
protected int
protected int
protected Reader
protected int
protected int
protected char[]
protected int
protected boolean
protected boolean
public static final boolean
staticFlag

Whether parser is static.

protected int
pack-priv int

Constructor Summary

AccessConstructor and Description
public
JavaCharStream(Reader dstream, int startline, int startcolumn, int buffersize)

Constructor.

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

Constructor.

public
JavaCharStream(Reader dstream)

Constructor.

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

Constructor.

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

Constructor.

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

Constructor.

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

Constructor.

public
JavaCharStream(InputStream dstream, String encoding)

Constructor.

public
JavaCharStream(InputStream dstream)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public void
adjustBeginLineColumn(int newLine, int newCol)

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

protected void
public void
backup(int amount)

Retreat.

public char
BeginToken()

Returns: starting character for token.

public void
Done()

Set buffers back to null when finished.

protected void
ExpandBuff(boolean wrapAround)

protected void
public int
getBeginColumn()

Returns: column of token start

public int
getBeginLine()

Returns: line number of token start

public int
getColumn()
Deprecated

public int
getEndColumn()

Get end column.

public int
getEndLine()

Get end line.

public String
GetImage()

Returns: token image as String

public int
getLine()
Deprecated

public char[]
GetSuffix(int len)

Returns: suffix

protected int
getTabSize(int i)

pack-priv static final int
hexval(char c)

protected char
public char
readChar()

Read a character.

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

Reinitialise.

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

Reinitialise.

public void
ReInit(Reader dstream)

Reinitialise.

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

Reinitialise.

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

Reinitialise.

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

Reinitialise.

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

Reinitialise.

public void
ReInit(InputStream dstream, String encoding)

Reinitialise.

public void
ReInit(InputStream dstream)

Reinitialise.

protected void
setTabSize(int i)

protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

availableback to summary
pack-priv int available
bufcolumnback to summary
protected int[] bufcolumn
bufferback to summary
protected char[] buffer
buflineback to summary
protected int[] bufline
bufposback to summary
public int bufpos

Position in buffer.

bufsizeback to summary
pack-priv int bufsize
columnback to summary
protected int column
inBufback to summary
protected int inBuf
inputStreamback to summary
protected Reader inputStream
lineback to summary
protected int line
maxNextCharIndback to summary
protected int maxNextCharInd
nextCharBufback to summary
protected char[] nextCharBuf
nextCharIndback to summary
protected int nextCharInd
prevCharIsCRback to summary
protected boolean prevCharIsCR
prevCharIsLFback to summary
protected boolean prevCharIsLF
staticFlagback to summary
public static final boolean staticFlag

Whether parser is static.

tabSizeback to summary
protected int tabSize
tokenBeginback to summary
pack-priv int tokenBegin

Constructor Detail

JavaCharStreamback to summary
public JavaCharStream(Reader dstream, int startline, int startcolumn, int buffersize)

Constructor.

JavaCharStreamback to summary
public JavaCharStream(Reader dstream, int startline, int startcolumn)

Constructor.

JavaCharStreamback to summary
public JavaCharStream(Reader dstream)

Constructor.

JavaCharStreamback to summary
public JavaCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException

Constructor.

JavaCharStreamback to summary
public JavaCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)

Constructor.

JavaCharStreamback to summary
public JavaCharStream(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException

Constructor.

JavaCharStreamback to summary
public JavaCharStream(InputStream dstream, int startline, int startcolumn)

Constructor.

JavaCharStreamback to summary
public JavaCharStream(InputStream dstream, String encoding) throws UnsupportedEncodingException

Constructor.

JavaCharStreamback to summary
public JavaCharStream(InputStream dstream)

Constructor.

Method Detail

adjustBeginLineColumnback to summary
public void adjustBeginLineColumn(int newLine, int newCol)

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

AdjustBuffSizeback to summary
protected void AdjustBuffSize()
backupback to summary
public void backup(int amount)

Retreat.

BeginTokenback to summary
public char BeginToken() throws IOException
Returns:char

starting character for token.

Doneback to summary
public void Done()

Set buffers back to null when finished.

ExpandBuffback to summary
protected void ExpandBuff(boolean wrapAround)
FillBuffback to summary
protected void FillBuff() throws IOException
getBeginColumnback to summary
public int getBeginColumn()
Returns:int

column of token start

getBeginLineback to summary
public int getBeginLine()
Returns:int

line number of token start

getColumnback to summary
public int getColumn()

Deprecated

Annotations
@Deprecated
getEndColumnback to summary
public int getEndColumn()

Get end column.

getEndLineback to summary
public int getEndLine()

Get end line.

GetImageback to summary
public String GetImage()
Returns:String

token image as String

getLineback to summary
public int getLine()

Deprecated

Annotations
@Deprecated
GetSuffixback to summary
public char[] GetSuffix(int len)
Returns:char[]

suffix

getTabSizeback to summary
protected int getTabSize(int i)
hexvalback to summary
pack-priv static final int hexval(char c) throws IOException
ReadByteback to summary
protected char ReadByte() throws IOException
readCharback to summary
public char readChar() throws IOException

Read a character.

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

Reinitialise.

ReInitback to summary
public void ReInit(Reader dstream, int startline, int startcolumn)

Reinitialise.

ReInitback to summary
public void ReInit(Reader dstream)

Reinitialise.

ReInitback to summary
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException

Reinitialise.

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

Reinitialise.

ReInitback to summary
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException

Reinitialise.

ReInitback to summary
public void ReInit(InputStream dstream, int startline, int startcolumn)

Reinitialise.

ReInitback to summary
public void ReInit(InputStream dstream, String encoding) throws UnsupportedEncodingException

Reinitialise.

ReInitback to summary
public void ReInit(InputStream dstream)

Reinitialise.

setTabSizeback to summary
protected void setTabSize(int i)
UpdateLineColumnback to summary
protected void UpdateLineColumn(char c)