/** * Read a character. * * @return Either The character value returned by <code>processChar()</code> * or <code>-1</code> if the end of file has been reached and * <code>throwEofException</code> is set to {@code false}. * @throws EOFException if the end of file is reached and * <code>throwEofException</code> is set to {@code true}. * @throws IOException if trying to read past the end of file. */ @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); }
/** * Read a character. * * @return Either The character value returned by <code>processChar()</code> * or <code>-1</code> if the end of file has been reached and * <code>throwEofException</code> is set to <code>false</code>. * @throws EOFException if the end of file is reached and * <code>throwEofException</code> is set to <code>true</code>. * @throws IOException if trying to read past the end of file. */ public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); }
/** * Read a character. * * @return Either The character value returned by <code>processChar()</code> * or <code>-1</code> if the end of file has been reached and * <code>throwEofException</code> is set to <code>false</code>. * @throws EOFException if the end of file is reached and * <code>throwEofException</code> is set to <code>true</code>. * @throws IOException if trying to read past the end of file. */ public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); }
/** * Read a character. * * @return Either The character value returned by <code>processChar()</code> * or <code>-1</code> if the end of file has been reached and * <code>throwEofException</code> is set to <code>false</code>. * @throws EOFException if the end of file is reached and * <code>throwEofException</code> is set to <code>true</code>. * @throws IOException if trying to read past the end of file. */ @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); }
/** * Read a character. * * @return Either The character value returned by <code>processChar()</code> * or <code>-1</code> if the end of file has been reached and * <code>throwEofException</code> is set to {@code false}. * @throws EOFException if the end of file is reached and * <code>throwEofException</code> is set to {@code true}. * @throws IOException if trying to read past the end of file. */ @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); }
/** * Read a character. * * @return Either The character value returned by <code>processChar()</code> * or <code>-1</code> if the end of file has been reached and * <code>throwEofException</code> is set to <code>false</code>. * @throws EOFException if the end of file is reached and * <code>throwEofException</code> is set to <code>true</code>. * @throws IOException if trying to read past the end of file. */ public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); }
/** * Read a character. * * @return Either The character value returned by <code>processChar()</code> * or <code>-1</code> if the end of file has been reached and * <code>throwEofException</code> is set to {@code false}. * @throws EOFException if the end of file is reached and * <code>throwEofException</code> is set to {@code true}. * @throws IOException if trying to read past the end of file. */ @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); }
/** * Read a character. * * @return Either The character value returned by <code>processChar()</code> * or <code>-1</code> if the end of file has been reached and * <code>throwEofException</code> is set to {@code false}. * @throws EOFException if the end of file is reached and * <code>throwEofException</code> is set to {@code true}. * @throws IOException if trying to read past the end of file. */ @Override public int read() throws IOException { if (eof) { throw new IOException("Read after end of file"); } if (position == size) { return doEndOfFile(); } position++; return processChar(); }