protected boolean awaitInput(final int timeout) throws IOException { if (this.inBuffer.hasBufferedData()) { return true; } fillInputBuffer(timeout); return this.inBuffer.hasBufferedData(); }
protected boolean awaitInput(final int timeout) throws IOException { if (this.inBuffer.hasBufferedData()) { return true; } fillInputBuffer(timeout); return this.inBuffer.hasBufferedData(); }
@Override public int read(final InputStream inputStream) throws IOException { Args.notNull(inputStream, "Input stream"); int readLen; while (!hasBufferedData()) { readLen = fillBuffer(inputStream); if (readLen == -1) { return -1; } } return this.buffer[this.bufferPos++] & 0xff; }
@Override public int read(final InputStream inputStream) throws IOException { Args.notNull(inputStream, "Input stream"); int readLen; while (!hasBufferedData()) { readLen = fillBuffer(inputStream); if (readLen == -1) { return -1; } } return this.buffer[this.bufferPos++] & 0xff; }
return 0; if (hasBufferedData()) { final int chunk = Math.min(len, this.bufferLen - this.bufferPos); System.arraycopy(this.buffer, this.bufferPos, b, off, chunk); while (!hasBufferedData()) { final int readLen = fillBuffer(inputStream); if (readLen == -1) {
return 0; if (hasBufferedData()) { final int chunk = Math.min(len, this.bufferLen - this.bufferPos); System.arraycopy(this.buffer, this.bufferPos, b, off, chunk); while (!hasBufferedData()) { final int readLen = fillBuffer(inputStream); if (readLen == -1) {
} else { if (hasBufferedData()) { final int len = this.bufferLen - this.bufferPos; this.lineBuffer.append(this.buffer, this.bufferPos, len);
} else { if (hasBufferedData()) { final int len = this.bufferLen - this.bufferPos; this.lineBuffer.append(this.buffer, this.bufferPos, len);