code: @Override
    public int read(byte []buf, int offset, int length) throws IOException
    {
      TempBuffer cursor = _cursor;
      
      if (cursor == null)
        return -1;
  
      int sublen = Math.min(length, cursor.length() - _offset);
  
      System.arraycopy(cursor.buffer(), _offset, buf, offset, sublen);
  
      if (cursor.length() <= _offset + sublen) {
        _cursor = cursor.next();
  
        if (_freeWhenDone) {
          cursor.next(null);
          TempBuffer.free(cursor);
          cursor = null;
        }
        _offset = 0;
      }
      else
        _offset += sublen;
  
      return sublen;
    }
docs: XXX: any way to make this automatically free?