/** * Implements <tt>BufferStreamAdapter#doRead(Buffer, byte[], int, int)</tt>. * Delegates to the wrapped <tt>PushSourceStream</tt>. * * @param buffer * @param data byte array to read * @param offset 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); }
read = stream.read(buf, 0, len);