docs: @Override
  	protected int require(int required) throws KryoException {
  		if(required > capacity) {
  			throw new KryoException("Buffer too small: capacity: " + capacity + ", " +
  					"required: " + required);
  		}
  
  		position = 0;
  		int bytesRead = 0;
  		int count;
  		while(true){
  			count = fill(buffer, bytesRead, required - bytesRead);
  
  			if(count == -1){
  				throw new KryoException(new EOFException("No more bytes left."));
  			}
  
  			bytesRead += count;
  			if(bytesRead == required){
  				break;
  			}
  		}
  		limit = required;
  		return required;
  	}