Class SimpleCharStream
- java.lang.Object
- 
- org.apache.jackrabbit.spi.commons.query.sql.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 SummaryFields Modifier and Type Field Description protected int[]bufcolumnprotected char[]bufferprotected int[]buflineintbufposprotected intcolumnprotected intinBufprotected ReaderinputStreamprotected intlineprotected intmaxNextCharIndprotected booleanprevCharIsCRprotected booleanprevCharIsLFstatic booleanstaticFlagprotected inttabSize
 - 
Constructor SummaryConstructors Constructor Description SimpleCharStream(InputStream dstream)SimpleCharStream(InputStream dstream, int startline, int startcolumn)SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)SimpleCharStream(InputStream dstream, String encoding)SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)SimpleCharStream(Reader dstream)SimpleCharStream(Reader dstream, int startline, int startcolumn)SimpleCharStream(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()StringGetImage()intgetLine()Deprecated.char[]GetSuffix(int len)protected intgetTabSize(int i)charreadChar()voidReInit(InputStream dstream)voidReInit(InputStream dstream, int startline, int startcolumn)voidReInit(InputStream dstream, int startline, int startcolumn, int buffersize)voidReInit(InputStream dstream, String encoding)voidReInit(InputStream dstream, String encoding, int startline, int startcolumn)voidReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)voidReInit(Reader dstream)voidReInit(Reader dstream, int startline, int startcolumn)voidReInit(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 Reader inputStream 
 - 
bufferprotected char[] buffer 
 - 
maxNextCharIndprotected int maxNextCharInd 
 - 
inBufprotected int inBuf 
 - 
tabSizeprotected int tabSize 
 
- 
 - 
Constructor Detail- 
SimpleCharStreampublic SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize) 
 - 
SimpleCharStreampublic SimpleCharStream(Reader dstream, int startline, int startcolumn) 
 - 
SimpleCharStreampublic SimpleCharStream(Reader dstream) 
 - 
SimpleCharStreampublic SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException - Throws:
- UnsupportedEncodingException
 
 - 
SimpleCharStreampublic SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize) 
 - 
SimpleCharStreampublic SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException - Throws:
- UnsupportedEncodingException
 
 - 
SimpleCharStreampublic SimpleCharStream(InputStream dstream, int startline, int startcolumn) 
 - 
SimpleCharStreampublic SimpleCharStream(InputStream dstream, String encoding) throws UnsupportedEncodingException - Throws:
- UnsupportedEncodingException
 
 - 
SimpleCharStreampublic SimpleCharStream(InputStream dstream) 
 
- 
 - 
Method Detail- 
setTabSizeprotected void setTabSize(int i) 
 - 
getTabSizeprotected int getTabSize(int i) 
 - 
ExpandBuffprotected void ExpandBuff(boolean wrapAround) 
 - 
FillBuffprotected void FillBuff() throws IOException- Throws:
- IOException
 
 - 
BeginTokenpublic char BeginToken() throws IOException- Throws:
- IOException
 
 - 
UpdateLineColumnprotected void UpdateLineColumn(char c) 
 - 
readCharpublic char readChar() throws IOException- Throws:
- 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(Reader dstream, int startline, int startcolumn, int buffersize) 
 - 
ReInitpublic void ReInit(Reader dstream, int startline, int startcolumn) 
 - 
ReInitpublic void ReInit(Reader dstream) 
 - 
ReInitpublic void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException - Throws:
- UnsupportedEncodingException
 
 - 
ReInitpublic void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize) 
 - 
ReInitpublic void ReInit(InputStream dstream, String encoding) throws UnsupportedEncodingException - Throws:
- UnsupportedEncodingException
 
 - 
ReInitpublic void ReInit(InputStream dstream) 
 - 
ReInitpublic void ReInit(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException - Throws:
- UnsupportedEncodingException
 
 - 
ReInitpublic void ReInit(InputStream dstream, int startline, int startcolumn) 
 - 
GetImagepublic 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.
 
- 
 
-