/** * Implements PullBufferStream#willReadBlock(). Delegates to the wrapped * PullSourceStream. * * @return true if this stream will block on read operation, false otherwise */ public boolean willReadBlock() { return stream.willReadBlock(); } }
/** * Implements <tt>BufferStreamAdapter#doRead(Buffer, byte[], int, int)</tt>. * Delegates to the wrapped <tt>PullSourceStream</tt>. * * @param buffer * @param data byte array to read * @param offset to start reading * @param length length to read * @return number of bytes read * @throws IOException if I/O related errors occurred during read operation */ @Override protected int doRead(Buffer buffer, byte[] data, int offset, int length) throws IOException { return stream.read(data, offset, length); }