/** * Read a byte. * * @return Either The byte value returned by <code>processByte()</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 processByte(); }
/** * Read a byte. * * @return Either The byte value returned by <code>processByte()</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 processByte(); }
/** * Read a byte. * * @return Either The byte value returned by <code>processByte()</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 processByte(); }
/** * Read a byte. * * @return Either The byte value returned by <code>processByte()</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 processByte(); }
/** * Read a byte. * * @return Either The byte value returned by <code>processByte()</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 processByte(); }
/** * Read a byte. * * @return Either The byte value returned by <code>processByte()</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 processByte(); }
/** * Read a byte. * * @return Either The byte value returned by <code>processByte()</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 processByte(); }
/** * Read a byte. * * @return Either The byte value returned by <code>processByte()</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 processByte(); }