private void validateExplicitHashKey(final String explicitHashKey){
  if (explicitHashKey == null) {
    return;
  }
  BigInteger b=null;
  try {
    b=new BigInteger(explicitHashKey);
    if (b.compareTo(UINT_128_MAX) > 0 || b.compareTo(BigInteger.ZERO) < 0) {
      throw new IllegalArgumentException("Invalid explicitHashKey, must be greater or equal to zero and less than or equal to (2^128 - 1), got " + explicitHashKey);
    }
  }
 catch (  NumberFormatException e) {
    throw new IllegalArgumentException("Invalid explicitHashKey, must be an integer, got " + explicitHashKey);
  }
}

private void validateExplicitHashKey ( final String explicitHashKey ) { if ( explicitHashKey == null ) { return ; } BigInteger b = null ; try { b = new BigInteger ( explicitHashKey ) ; if ( b . compareTo ( UINT_128_MAX ) > 0 || b . compareTo ( BigInteger . ZERO ) < 0 ) { throw new IllegalArgumentException ( "Invalid explicitHashKey, must be greater or equal to zero and less than or equal to (2^128 - 1), got " + explicitHashKey ) ; } } catch ( NumberFormatException e ) { throw new IllegalArgumentException ( "Invalid explicitHashKey, must be an integer, got " + explicitHashKey ) ; } }
validate the explicit hash key of an input kinesis user record .
