code: @Override
    public int readTimeout(byte []buffer, int offset, int length,
                           long timeout)
      throws IOException
    {
      int sublen = getDelegate().readTimeout(buffer, offset, length, timeout);
      
      if (sublen > 0) {
        logStream().write(buffer, offset, sublen);
      }
      return sublen;
    }
docs: Reads the next chunk from the stream in non-blocking mode.
  
  @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, -1 on end of file, or 0 on timeout.