docs: public static byte[] ensureCapacity(byte[] array, int minCapacity) {
  	int oldCapacity = array.length;
  	byte[] newArray;
  	if (minCapacity > oldCapacity) {
  	    int newCapacity = (oldCapacity * 3)/2 + 1;
  		if (newCapacity < minCapacity) {
  			newCapacity = minCapacity;
  		}
  		
  	    newArray = new byte[newCapacity];
  	    System.arraycopy(array, 0, newArray, 0, oldCapacity);
  	}
  	else {
  		newArray=array;
  	}
  	return newArray;
  }