public class SimpleCharStream extends Object
| Modifier and Type | Field and Description | 
|---|---|
| protected int[] | bufcolumn | 
| protected char[] | buffer | 
| protected int[] | bufline | 
| int | bufposPosition in buffer. | 
| protected int | column | 
| protected int | inBuf | 
| protected Reader | inputStream | 
| protected int | line | 
| protected int | maxNextCharInd | 
| protected boolean | prevCharIsCR | 
| protected boolean | prevCharIsLF | 
| static boolean | staticFlagWhether parser is static. | 
| protected int | tabSize | 
| Constructor and Description | 
|---|
| SimpleCharStream(InputStream dstream)Constructor. | 
| SimpleCharStream(InputStream dstream,
                int startline,
                int startcolumn)Constructor. | 
| SimpleCharStream(InputStream dstream,
                int startline,
                int startcolumn,
                int buffersize)Constructor. | 
| SimpleCharStream(InputStream dstream,
                String encoding)Constructor. | 
| SimpleCharStream(InputStream dstream,
                String encoding,
                int startline,
                int startcolumn)Constructor. | 
| SimpleCharStream(InputStream dstream,
                String encoding,
                int startline,
                int startcolumn,
                int buffersize)Constructor. | 
| SimpleCharStream(Reader dstream)Constructor. | 
| SimpleCharStream(Reader dstream,
                int startline,
                int startcolumn)Constructor. | 
| SimpleCharStream(Reader dstream,
                int startline,
                int startcolumn,
                int buffersize)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
| char | BeginToken()Start. | 
| void | Done()Reset buffer when finished. | 
| protected void | ExpandBuff(boolean wrapAround) | 
| protected void | FillBuff() | 
| int | getBeginColumn() | 
| int | getBeginLine() | 
| int | getColumn()Deprecated.   | 
| int | getEndColumn() | 
| int | getEndLine() | 
| String | GetImage() | 
| int | getLine()Deprecated.   | 
| char[] | GetSuffix(int len) | 
| protected int | getTabSize(int i) | 
| char | readChar()Read a character. | 
| void | ReInit(InputStream dstream)Reinitialise. | 
| void | ReInit(InputStream dstream,
      int startline,
      int startcolumn)Reinitialise. | 
| void | ReInit(InputStream dstream,
      int startline,
      int startcolumn,
      int buffersize)Reinitialise. | 
| void | ReInit(InputStream dstream,
      String encoding)Reinitialise. | 
| void | ReInit(InputStream dstream,
      String encoding,
      int startline,
      int startcolumn)Reinitialise. | 
| void | ReInit(InputStream dstream,
      String encoding,
      int startline,
      int startcolumn,
      int buffersize)Reinitialise. | 
| void | ReInit(Reader dstream)Reinitialise. | 
| void | ReInit(Reader dstream,
      int startline,
      int startcolumn)Reinitialise. | 
| void | ReInit(Reader dstream,
      int startline,
      int startcolumn,
      int buffersize)Reinitialise. | 
| protected void | setTabSize(int i) | 
| protected void | UpdateLineColumn(char c) | 
public static final boolean staticFlag
public int bufpos
protected int[] bufline
protected int[] bufcolumn
protected int column
protected int line
protected boolean prevCharIsCR
protected boolean prevCharIsLF
protected Reader inputStream
protected char[] buffer
protected int maxNextCharInd
protected int inBuf
protected int tabSize
public SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
dstream - streamstartline - start linestartcolumn - start columnbuffersize - buffer sizepublic SimpleCharStream(Reader dstream, int startline, int startcolumn)
dstream - streamstartline - start linestartcolumn - start columnpublic SimpleCharStream(Reader dstream)
dstream - streampublic SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException
dstream - streamencoding - encodingstartline - start linestartcolumn - start columnbuffersize - buffer sizeUnsupportedEncodingException - in case of unsupported encodingpublic SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
dstream - streamstartline - start linestartcolumn - start columnbuffersize - buffer sizepublic SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException
dstream - streamencoding - encodingstartline - start linestartcolumn - start columnUnsupportedEncodingException - in case of unsupported encodingpublic SimpleCharStream(InputStream dstream, int startline, int startcolumn)
dstream - streamstartline - start linestartcolumn - start columnpublic SimpleCharStream(InputStream dstream, String encoding) throws UnsupportedEncodingException
dstream - streamencoding - encodingUnsupportedEncodingException - in case of unsupported encodingpublic SimpleCharStream(InputStream dstream)
dstream - streamprotected void setTabSize(int i)
protected int getTabSize(int i)
protected void ExpandBuff(boolean wrapAround)
protected void FillBuff()
                 throws IOException
IOExceptionpublic char BeginToken()
                throws IOException
IOException - in case of IO errorsprotected void UpdateLineColumn(char c)
public char readChar()
              throws IOException
IOException - in case of IO errorspublic int getColumn()
getEndColumn()public int getLine()
getEndLine()public int getEndColumn()
public int getEndLine()
public int getBeginColumn()
public int getBeginLine()
public void backup(int amount)
amount - amount of characterspublic void ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
dstream - streamstartline - start linestartcolumn - start columnbuffersize - buffer sizepublic void ReInit(Reader dstream, int startline, int startcolumn)
dstream - streamstartline - start linestartcolumn - start columnpublic void ReInit(Reader dstream)
dstream - streampublic void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException
dstream - streamencoding - encodingstartline - start linestartcolumn - start columnbuffersize - buffer sizeUnsupportedEncodingException - in case of unsupported encodingpublic void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
dstream - streamstartline - start linestartcolumn - start columnbuffersize - buffer sizepublic void ReInit(InputStream dstream, String encoding) throws UnsupportedEncodingException
dstream - streamencoding - encodingUnsupportedEncodingException - in case of unsupported encodingpublic void ReInit(InputStream dstream)
dstream - streampublic void ReInit(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException
dstream - streamencoding - encodingstartline - start linestartcolumn - start columnUnsupportedEncodingException - in case of unsupported encodingpublic void ReInit(InputStream dstream, int startline, int startcolumn)
dstream - streamstartline - start linestartcolumn - start columnpublic String GetImage()
public char[] GetSuffix(int len)
len - lengthpublic void Done()
public void adjustBeginLineColumn(int newLine,
                                  int newCol)
newLine - new linenewCol - new columnCopyright © 2000–2025 Apache Software Foundation. All rights reserved.