/** * Invokes the delegate's <code>read()</code> method. * @return the character read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read() throws IOException { try { beforeRead(1); final int c = in.read(); afterRead(c != EOF ? 1 : EOF); return c; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(char[])</code> method. * @param chr the buffer to read the characters into * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(final char[] chr) throws IOException { try { beforeRead(chr != null ? chr.length : 0); final int n = in.read(chr); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(char[], int, int)</code> method. * @param chr the buffer to read the characters into * @param st The start offset * @param len The number of bytes to read * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(final char[] chr, final int st, final int len) throws IOException { try { beforeRead(len); final int n = in.read(chr, st, len); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(CharBuffer)</code> method. * @param target the char buffer to read the characters into * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs * @since 2.0 */ @Override public int read(final CharBuffer target) throws IOException { try { beforeRead(target != null ? target.length() : 0); final int n = in.read(target); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read()</code> method. * @return the character read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read() throws IOException { try { beforeRead(1); int c = in.read(); afterRead(c != -1 ? 1 : -1); return c; } catch (IOException e) { handleIOException(e); return -1; } }
/** * Invokes the delegate's <code>read(char[])</code> method. * @param chr the buffer to read the characters into * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(final char[] chr) throws IOException { try { beforeRead(chr != null ? chr.length : 0); final int n = in.read(chr); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(char[])</code> method. * @param chr the buffer to read the characters into * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(final char[] chr) throws IOException { try { beforeRead(chr != null ? chr.length : 0); final int n = in.read(chr); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(char[])</code> method. * @param chr the buffer to read the characters into * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(char[] chr) throws IOException { try { beforeRead(chr != null ? chr.length : 0); int n = in.read(chr); afterRead(n); return n; } catch (IOException e) { handleIOException(e); return -1; } }
/** * Invokes the delegate's <code>read()</code> method. * @return the character read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read() throws IOException { try { beforeRead(1); final int c = in.read(); afterRead(c != EOF ? 1 : EOF); return c; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read()</code> method. * @return the character read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read() throws IOException { try { beforeRead(1); int c = in.read(); afterRead(c != -1 ? 1 : -1); return c; } catch (IOException e) { handleIOException(e); return -1; } }
/** * Invokes the delegate's <code>read()</code> method. * @return the character read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read() throws IOException { try { beforeRead(1); final int c = in.read(); afterRead(c != EOF ? 1 : EOF); return c; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(char[], int, int)</code> method. * @param chr the buffer to read the characters into * @param st The start offset * @param len The number of bytes to read * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(char[] chr, int st, int len) throws IOException { try { beforeRead(len); int n = in.read(chr, st, len); afterRead(n); return n; } catch (IOException e) { handleIOException(e); return -1; } }
/** * Invokes the delegate's <code>read(char[])</code> method. * @param chr the buffer to read the characters into * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(char[] chr) throws IOException { try { beforeRead(chr != null ? chr.length : 0); int n = in.read(chr); afterRead(n); return n; } catch (IOException e) { handleIOException(e); return -1; } }
/** * Invokes the delegate's <code>read(char[], int, int)</code> method. * @param chr the buffer to read the characters into * @param st The start offset * @param len The number of bytes to read * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(final char[] chr, final int st, final int len) throws IOException { try { beforeRead(len); final int n = in.read(chr, st, len); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(char[], int, int)</code> method. * @param chr the buffer to read the characters into * @param st The start offset * @param len The number of bytes to read * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(char[] chr, int st, int len) throws IOException { try { beforeRead(len); int n = in.read(chr, st, len); afterRead(n); return n; } catch (IOException e) { handleIOException(e); return -1; } }
/** * Invokes the delegate's <code>read(char[], int, int)</code> method. * @param chr the buffer to read the characters into * @param st The start offset * @param len The number of bytes to read * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(final char[] chr, final int st, final int len) throws IOException { try { beforeRead(len); final int n = in.read(chr, st, len); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(CharBuffer)</code> method. * @param target the char buffer to read the characters into * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs * @since 2.0 */ @Override public int read(CharBuffer target) throws IOException { try { beforeRead(target != null ? target.length() : 0); int n = in.read(target); afterRead(n); return n; } catch (IOException e) { handleIOException(e); return -1; } }
/** * Invokes the delegate's <code>read(CharBuffer)</code> method. * @param target the char buffer to read the characters into * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs * @since 2.0 */ @Override public int read(final CharBuffer target) throws IOException { try { beforeRead(target != null ? target.length() : 0); final int n = in.read(target); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(CharBuffer)</code> method. * @param target the char buffer to read the characters into * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs * @since 2.0 */ @Override public int read(final CharBuffer target) throws IOException { try { beforeRead(target != null ? target.length() : 0); final int n = in.read(target); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } }
/** * Invokes the delegate's <code>read(CharBuffer)</code> method. * @param target the char buffer to read the characters into * @return the number of characters read or -1 if the end of stream * @throws IOException if an I/O error occurs * @since 2.0 */ @Override public int read(CharBuffer target) throws IOException { try { beforeRead(target != null ? target.length() : 0); int n = in.read(target); afterRead(n); return n; } catch (IOException e) { handleIOException(e); return -1; } }