code: public int read(char []buffer, int offset, int length)
    {
      int readLength = 0;
      
      while (length > 0) {
        if (_length <= _offset) {
          if (_head == null)
            return readLength == 0 ? -1 : readLength;
  
          TempCharBuffer next = _head.getNext();
          if (_isFree)
            TempCharBuffer.free(_head);
          _head = next;
  
          if (_head == null)
            return readLength == 0 ? -1 : readLength;
        
          _buffer = _head.buffer();
          _length = _head.getLength();
          _offset = 0;
        }
  
        int sublen = _length - _offset;
  
        if (length < sublen)
          sublen = length;
  
        System.arraycopy(_buffer, _offset, buffer, offset, sublen);
  
        _offset += sublen;
        offset += sublen;
        length -= sublen;
        readLength += sublen;
      }
  
      return readLength;
    }
docs: Reads the next character.