docs: public static short[] trimToCapacity(short[] array, int maxCapacity) {
  	if (array.length > maxCapacity) {
  	    short oldArray[] = array;
  	    array = new short[maxCapacity];
  	    System.arraycopy(oldArray, 0, array, 0, maxCapacity);
  	}
  	return array;
  }