code: @Override
    public int read(byte []buffer, int offset, int length) throws IOException
    {
      int sublen = getDelegate().read(buffer, offset, length);
      
      if (sublen > 0) {
        logStream().write(buffer, offset, sublen);
      }
      
      return sublen;
    }
docs: Reads the next chunk from the stream.
  
  @param buffer byte array receiving the data.
  @param offset starting offset into the array.
  @param length number of bytes to read.
  
  @return the number of bytes read or -1 on end of file.