code: public static int compareSerializedDate(DataInputView firstSource, DataInputView secondSource,
  			boolean ascendingComparison) throws IOException {
  		final long l1 = firstSource.readLong();
  		final long l2 = secondSource.readLong();
  		final int comp = (l1 < l2 ? -1 : (l1 == l2 ? 0 : 1));
  		return ascendingComparison ? comp : -comp;
  	}
docs: --------------------------------------------------------------------------------------------