/** Read a character. */ public char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } ++bufpos; if (bufpos >= maxNextCharInd) fillBuff(); char c = buffer[bufpos]; if (trackLineColumn) updateLineColumn(c); return c; }
public char beginToken() throws java.io.IOException { tokenBegin = -1; char c = readChar(); tokenBegin = bufpos; return c; }
bufpos = maxNextCharInd = 0; else expandBuff(false); else if ((tokenBegin - available) < 2048) expandBuff(true); else available = tokenBegin; final int i = streamRead(buffer, maxNextCharInd, available - maxNextCharInd); if (i == -1) streamClose(); throw new java.io.IOException(); backup(0); if (tokenBegin == -1) tokenBegin = bufpos;
/** Reinitialise. */ public void reInit(final java.io.Reader dstream, final int startline, final int startcolumn, final int buffersize) { inputStream = dstream; super.reInit (startline, startcolumn, buffersize); }
bufpos = maxNextCharInd = 0; else expandBuff(false); else if ((tokenBegin - available) < 2048) expandBuff(true); else available = tokenBegin; final int i = streamRead(buffer, maxNextCharInd, available - maxNextCharInd); if (i == -1) streamClose(); throw new java.io.IOException(); backup(0); if (tokenBegin == -1) tokenBegin = bufpos;
/** Reinitialise. */ public void reInit(final java.io.Reader dstream, final int startline, final int startcolumn, final int buffersize) { inputStream = dstream; super.reInit (startline, startcolumn, buffersize); }
/** Read a character. */ public char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } ++bufpos; if (bufpos >= maxNextCharInd) fillBuff(); char c = buffer[bufpos]; if (trackLineColumn) updateLineColumn(c); return c; }
public char beginToken() throws java.io.IOException { tokenBegin = -1; char c = readChar(); tokenBegin = bufpos; return c; }