code: @Override
    public int read(long pos, byte []buf, int offset, int length)
    {
      if (_fullLength <= pos) {
        return -1;
      }
      
      if (pos < 0) {
        throw new IllegalArgumentException();
      }
      
      PageBlob[] pages = _pages;
  
      int i = 0;
      for (; i < pages.length && pages[i].getLength() <= pos; i++) {
        pos -= pages[i].getLength();
      }
      
      if (pages.length <= i) {
        return -1;
      }
      
      PageBlob page = _pages[i];
      
      if (page.getType() != Type.BLOB) {
        page = _pageService.getBlobPage(page.getId());
        pages[i] = page;
      }
  
      /*
      if (! isValid()) {
        return -1;
      }
      */
  
      // XXX: multipage
      int pageLen = page.getLength();
      int pagePos = (int) pos;
      
      int sublen = Math.min(length, pageLen - pagePos);
  
      int readLen = page.read(pagePos, buf, offset, sublen);
      
      if (readLen <= 0) {
        log.warning("BLOB-READ UNEXPECTED EOF: " + pos + " " + _fullLength + " " + page); 
      }
      
      return readLen;
      
      /*
      int sublen = _length - _offset;
      
      if (sublen <= 0) {
        int pid = _blobPage.getNextId();
        
        if (pid <= 0) {
          return -1;
        }
        
        _blobPage = _cursor.getTable().getTableService().getBlobPage(pid);
        _length = _blobPage.getLength();
        _offset = 0;
        
        sublen = _length - _offset;
      }
      
      sublen = Math.min(sublen, length);
      
      int result = _blobPage.read(_offset, buf, offset, sublen);
      
      if (result > 0) {
        _offset += result;
      }
      
      return result;
      */
    }
docs: Reads a buffer.