/** * Marks the read limit of the StringReader. * * @param limit the maximum limit of bytes that can be read before the mark position becomes invalid */ public synchronized void mark( final int limit ) { try { in.mark( limit ); } catch ( IOException ioe ) { throw new RuntimeException( ioe.getMessage() ); } }
public void mark(int pReadLimit) throws IOException { if (pReadLimit < 0){ throw new IllegalArgumentException("Read limit < 0"); } synchronized (finalLock) { ensureOpen(); mark = next; markedString = currentSting; current.mark(pReadLimit); } }
@Override public void mark(int readAheadLimit) throws IOException { stringReader.mark(readAheadLimit); }
@Override public void mark(int readAheadLimit) throws IOException { stringReader.mark(readAheadLimit); }
@Override public void mark(int readAheadLimit) throws IOException { stringReader.mark(readAheadLimit); }
public void mark(int readAheadLimit) throws IOException { freemarkerProcessedReader.mark(readAheadLimit); }
public synchronized void mark(final int limit) { try { in.mark(limit); } catch (IOException ioe) { throw new RuntimeException(ioe.getMessage()); } }
/** * Marks the read limit of the StringReader. * * @param limit the maximum limit of bytes that can be read before the * mark position becomes invalid */ public synchronized void mark( final int limit ) { try { in.mark( limit ); } catch ( IOException ioe ) { throw new RuntimeException( ioe.getMessage() ); } }
/** * Marks the read limit of the StringReader. * * @param limit the maximum limit of bytes that can be read before the * mark position becomes invalid */ public synchronized void mark( final int limit ) { try { in.mark( limit ); } catch ( IOException ioe ) { throw new RuntimeException( ioe.getMessage() ); } }
public void mark(int pReadLimit) throws IOException { if (pReadLimit < 0){ throw new IllegalArgumentException("Read limit < 0"); } synchronized (finalLock) { ensureOpen(); mark = next; markedString = currentSting; current.mark(pReadLimit); } }
StringReader reader = new StringReader("Test123"); boolean bool = doSomething(reader)//reads from reader with calls to mark() inside if (bool == false) { reader.mark(0); reader.reset(); } doSomethingElse(reader);
public void mark(int pReadLimit) throws IOException { if (pReadLimit < 0){ throw new IllegalArgumentException("Read limit < 0"); } synchronized (mLock) { ensureOpen(); mMark = mNext; mMarkedString = mCurrentSting; mCurrent.mark(pReadLimit); } }
/* package */ int readChar() throws IOException { // Mark the current position in case we have to // unread. mInput.mark(1); ++mIndex; return (mInput.read()); } // end of readChar()
class MyReader { private int mark = 0; private StringReader reader; MyReader( StringReader reader, int mark ) { this.reader = reader; this.mark = mark; } public StringReader getReader() { return reader; } public void hardReset() { reader.mark(mark); reader.reset(); } }
private static int peek(StringReader reader) throws IOException { reader.mark(1); int result = reader.read(); reader.reset(); return result; }
/** * Method rdoubleAll Read array of points. * The dimension of the points is judged from the actual input line. * * @return The points[][] read until EOF is met. */ public double[][] rdoubleAll() throws IOException { this.inp.mark(100000000); String eing = this.rString(); this.inp.reset(); StringTokenizer st = new StringTokenizer(eing, this.delimiters); return this.rdoubleAll(st.countTokens()); } }
/** * Peek ahead * * @return the char * @throws ParseException problem parsing */ private char peek() throws ParseException { try { reader.mark(10); int aChar = reader.read(); reader.reset(); if (aChar < 0) { return (char) 0; } else { return (char) aChar; } } catch (java.io.IOException e1) { throw new ParseException("Strange io error " + e1, position); } }