public void input(int b) throws IOException { input(new byte[] {(byte) b}); }
public void input(final String s) throws IOException { if (s == null) { throw new IllegalArgumentException("Input may not be null"); } input(s.getBytes()); } }
public int read(byte[] b) throws IOException { int l = this.in.read(b); if (this.wire.enabled() && l > 0) { this.wire.input(b, 0, l); } return l; }
public int read(byte[] b, int off, int len) throws IOException { int l = this.in.read(b, off, len); if (this.wire.enabled() && l > 0) { this.wire.input(b, off, l); } return l; }
public String readLine() throws IOException { String s = this.in.readLine(); if (this.wire.enabled() && s != null) { this.wire.input(s + "[EOL]"); } return s; }
public int read() throws IOException { int l = this.in.read(); if (this.wire.enabled() && l > 0) { this.wire.input(l); } return l; }
public int readLine(final CharArrayBuffer buffer) throws IOException { int l = this.in.readLine(buffer); if (this.wire.enabled() && l > 0) { int pos = buffer.length() - l; String s = new String(buffer.buffer(), pos, l); this.wire.input(s + "[EOL]"); } return l; }
@Override public void close() throws IOException { try { in.close(); } catch (final IOException ex) { wire.input("[close] I/O error: " + ex.getMessage()); throw ex; } }
@Override public int available() throws IOException { try { return in.available(); } catch (IOException ex) { wire.input("[available] I/O error : " + ex.getMessage()); throw ex; } }
@Override public long skip(final long n) throws IOException { try { return super.skip(n); } catch (IOException ex) { wire.input("[skip] I/O error: " + ex.getMessage()); throw ex; } }
@Override public void close() throws IOException { try { in.close(); } catch (final IOException ex) { wire.input("[close] I/O error: " + ex.getMessage()); throw ex; } }
@Override public long skip(final long n) throws IOException { try { return super.skip(n); } catch (final IOException ex) { wire.input("[skip] I/O error: " + ex.getMessage()); throw ex; } }
@Override public int available() throws IOException { try { return in.available(); } catch (final IOException ex) { wire.input("[available] I/O error : " + ex.getMessage()); throw ex; } }
@Override public long skip(final long n) throws IOException { try { return super.skip(n); } catch (final IOException ex) { wire.input("[skip] I/O error: " + ex.getMessage()); throw ex; } }
public void input(final String s) throws IOException { Args.notNull(s, "Input"); input(s.getBytes()); } }
public void input(final String s) throws IOException { Args.notNull(s, "Input"); input(s.getBytes()); } }
public int read(byte[] b, int off, int len) throws IOException { int l = this.in.read(b, off, len); if (this.wire.enabled() && l > 0) { this.wire.input(b, off, l); } return l; }
public int read() throws IOException { int l = this.in.read(); if (this.wire.enabled() && l > 0) { this.wire.input(l); } return l; }
public int read(final byte[] b, final int off, final int len) throws IOException { final int l = this.in.read(b, off, len); if (this.wire.enabled() && l > 0) { this.wire.input(b, off, l); } return l; }
public int readLine(final CharArrayBuffer buffer) throws IOException { int l = this.in.readLine(buffer); if (this.wire.enabled() && l > 0) { int pos = buffer.length() - l; String s = new String(buffer.buffer(), pos, l); this.wire.input(s + "[EOL]"); } return l; }