public long getReceivedBytesCount() { if (this.inTransportMetric != null) { return this.inTransportMetric.getBytesTransferred(); } else { return -1; } }
public int available() throws IOException { if (!this.closed && this.in.isDataAvailable(10)) { return 1; } else { return 0; } }
/** * <p>Does not close the underlying socket output.</p> * * @throws IOException If an I/O problem occurs. */ public void close() throws IOException { if (!this.closed) { this.closed = true; this.out.flush(); } }
public int read(final byte[] b, int off, int len) throws IOException { if (this.closed) { return -1; } else { return this.in.read(b, off, len); } }
public String readLine() throws IOException { String s = this.in.readLine(); if (this.wire.enabled() && s != null) { this.wire.input(s + "[EOL]"); } return s; }
public HttpTransportMetrics getMetrics() { return this.out.getMetrics(); }
public HttpTransportMetrics getMetrics() { return this.in.getMetrics(); }
public void write(byte[] b, int off, int len) throws IOException { this.out.write(b, off, len); if (this.wire.enabled()) { this.wire.output(b, off, len); } }
/** * <p>Does not close the underlying socket output.</p> * * @throws IOException If an I/O problem occurs. */ public void close() throws IOException { if (!this.closed) { this.closed = true; this.out.flush(); } }
public int read() throws IOException { if (this.closed) { return -1; } else { return this.in.read(); } }
public boolean isDataAvailable(int timeout) throws IOException { return this.in.isDataAvailable(timeout); }
public long getSentBytesCount() { if (this.outTransportMetric != null) { return this.outTransportMetric.getBytesTransferred(); } else { return -1; } }
public void flush() throws IOException { this.out.flush(); }
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 void flush() throws IOException { this.out.flush(); }
protected void doFlush() throws IOException { this.outbuffer.flush(); }
protected void doFlush() throws IOException { this.outbuffer.flush(); }
public void flush() throws IOException { this.out.flush(); }