Package com.reportmill.parsing
Class SimpleCharStream
- java.lang.Object
- 
- com.reportmill.parsing.SimpleCharStream
 
- 
 public class SimpleCharStream extends java.lang.ObjectAn implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
- 
- 
Field SummaryFields Modifier and Type Field Description protected int[]bufcolumnprotected char[]bufferprotected int[]buflineintbufposprotected intcolumnprotected intinBufprotected java.io.ReaderinputStreamprotected intlineprotected intmaxNextCharIndprotected booleanprevCharIsCRprotected booleanprevCharIsLFstatic booleanstaticFlagprotected inttabSize
 - 
Constructor SummaryConstructors Constructor Description SimpleCharStream(java.io.InputStream dstream)SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn)SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)SimpleCharStream(java.io.InputStream dstream, java.lang.String encoding)SimpleCharStream(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn)SimpleCharStream(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn, int buffersize)SimpleCharStream(java.io.Reader dstream)SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn)SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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()Deprecated.intgetEndColumn()intgetEndLine()java.lang.StringGetImage()intgetLine()Deprecated.char[]GetSuffix(int len)protected intgetTabSize(int i)charreadChar()voidReInit(java.io.InputStream dstream)voidReInit(java.io.InputStream dstream, int startline, int startcolumn)voidReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)voidReInit(java.io.InputStream dstream, java.lang.String encoding)voidReInit(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn)voidReInit(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn, int buffersize)voidReInit(java.io.Reader dstream)voidReInit(java.io.Reader dstream, int startline, int startcolumn)voidReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize)protected voidsetTabSize(int i)protected voidUpdateLineColumn(char c)
 
- 
- 
- 
Field Detail- 
staticFlagpublic static final boolean staticFlag - See Also:
- Constant Field Values
 
 - 
bufpospublic int bufpos 
 - 
buflineprotected int[] bufline 
 - 
bufcolumnprotected int[] bufcolumn 
 - 
columnprotected int column 
 - 
lineprotected int line 
 - 
prevCharIsCRprotected boolean prevCharIsCR 
 - 
prevCharIsLFprotected boolean prevCharIsLF 
 - 
inputStreamprotected java.io.Reader inputStream 
 - 
bufferprotected char[] buffer 
 - 
maxNextCharIndprotected int maxNextCharInd 
 - 
inBufprotected int inBuf 
 - 
tabSizeprotected int tabSize 
 
- 
 - 
Constructor Detail- 
SimpleCharStreampublic SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
 - 
SimpleCharStreampublic SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn)
 - 
SimpleCharStreampublic SimpleCharStream(java.io.Reader dstream) 
 - 
SimpleCharStreampublic SimpleCharStream(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException- Throws:
- java.io.UnsupportedEncodingException
 
 - 
SimpleCharStreampublic SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)
 - 
SimpleCharStreampublic SimpleCharStream(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException- Throws:
- java.io.UnsupportedEncodingException
 
 - 
SimpleCharStreampublic SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn)
 - 
SimpleCharStreampublic SimpleCharStream(java.io.InputStream dstream, java.lang.String encoding) throws java.io.UnsupportedEncodingException- Throws:
- java.io.UnsupportedEncodingException
 
 - 
SimpleCharStreampublic SimpleCharStream(java.io.InputStream dstream) 
 
- 
 - 
Method Detail- 
setTabSizeprotected void setTabSize(int i) 
 - 
getTabSizeprotected int getTabSize(int i) 
 - 
ExpandBuffprotected void ExpandBuff(boolean wrapAround) 
 - 
FillBuffprotected void FillBuff() throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
BeginTokenpublic char BeginToken() throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
UpdateLineColumnprotected void UpdateLineColumn(char c) 
 - 
readCharpublic char readChar() throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
getColumn@Deprecated public int getColumn() Deprecated.- See Also:
- getEndColumn()
 
 - 
getLine@Deprecated public int getLine() Deprecated.- See Also:
- getEndLine()
 
 - 
getEndColumnpublic int getEndColumn() 
 - 
getEndLinepublic int getEndLine() 
 - 
getBeginColumnpublic int getBeginColumn() 
 - 
getBeginLinepublic int getBeginLine() 
 - 
backuppublic void backup(int amount) 
 - 
ReInitpublic void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
 - 
ReInitpublic void ReInit(java.io.Reader dstream, int startline, int startcolumn)
 - 
ReInitpublic void ReInit(java.io.Reader dstream) 
 - 
ReInitpublic void ReInit(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException- Throws:
- java.io.UnsupportedEncodingException
 
 - 
ReInitpublic void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)
 - 
ReInitpublic void ReInit(java.io.InputStream dstream, java.lang.String encoding) throws java.io.UnsupportedEncodingException- Throws:
- java.io.UnsupportedEncodingException
 
 - 
ReInitpublic void ReInit(java.io.InputStream dstream) 
 - 
ReInitpublic void ReInit(java.io.InputStream dstream, java.lang.String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException- Throws:
- java.io.UnsupportedEncodingException
 
 - 
ReInitpublic void ReInit(java.io.InputStream dstream, int startline, int startcolumn)
 - 
GetImagepublic java.lang.String GetImage() 
 - 
GetSuffixpublic char[] GetSuffix(int len) 
 - 
Donepublic void Done() 
 - 
adjustBeginLineColumnpublic void adjustBeginLineColumn(int newLine, int newCol)Method to adjust line and column numbers for the start of a token.
 
- 
 
-