code: public long getPrimitive(int index) {
  	if (index < 0 || index >= maxLength) {
  	    throw new ArrayIndexOutOfBoundsException("invalid index: " + 
  						     index);
  	}
  	int pos = Arrays.binarySearch(indices, index);
  
  	long value = (pos >= 0) ? values[pos] : 0;
  	return value;
      }
docs: Retrieve the value at specified index or 0 if no value had been
  specified.
  
  @param index the position in the array
  
  @return the primitive value at that position
  
  @throws ArrayIndexOutOfBoundException if the index is greater than
  the maximum length of the array.