Return true or false if the input is a long
@param input
@return boolean
481280
public static boolean isLong(String input) {
        try {
            Long.parseLong(input);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
1263150
private boolean isLong(final String str) {
		try {
			Long.valueOf(str);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	}
487173
def read_longlong(self):
        """"""
        self.bitcount = self.bits = 0
        return unpack('>Q', self.input.read(8))[0]
1022787
public boolean verify(JComponent input) {
        JTextField tf = (JTextField) input;
        try {
            int inputInt = Integer.parseInt(tf.getText());
            return (inputInt >= min && inputInt <= max);
        } catch (NumberFormatException e) {
            return false;
        }
    }
20402
def long_encode(input, errors='strict'):
    
    if not isinstance(input, text_type):
        input = text_type(input, sys.getdefaultencoding(), errors)
    length = len(input)
    input = unicodedata.normalize('NFKC', input)
    return input.translate(long_table), length
1371080
@Override
    public boolean isValid(Object input) {
        Float d;
        try {
            d = (Float) input;
        } catch (Exception e) {
            return false;
        }

        if (allowNaN && Float.isNaN(d))
            return true;
        if (allowInfinite && Float.isInfinite(d))
            return true;

        if (minAllowedValue != null && d < minAllowedValue)
            return false;
        if (maxAllowedValue != null && d > maxAllowedValue)
            return false;

        return true;
    }
476602
public static boolean isValidLong(@Nullable final String longStr) {
        if (StringUtils.isBlank(longStr)) {
            return false;
        }
        final String stripedLong = StringUtils.strip(longStr);
        try {
            NumberUtils.createLong(stripedLong);
            return true;
        } catch (NumberFormatException e) {
            return false;
        }
    }
1208949
public static int longToInt(long inLong) {

        if (inLong < Integer.MIN_VALUE) {
            return Integer.MIN_VALUE;
        }

        if (inLong > Integer.MAX_VALUE) {
            return Integer.MAX_VALUE;
        }

        return (int) inLong;
    }
673945
public Long getLong(String key)
   {
      Long longValue = null;
      String sVal = getText(key);
      if ((sVal != null) && (sVal.length() > 0))
      {
         longValue = Long.valueOf(sVal);
      }
      return longValue;
   }
332865
public static Long getLong(boolean validate, String key) {
		return Long.valueOf(getString(validate, key));
	}
1198357
private static byte[] toBytes(Object input) {
        if (input instanceof byte[]) {
            return (byte[]) input;
        } else if (input instanceof String) {
            String inputString = (String) input;
            return inputString.getBytes();
        } else if (input instanceof Long) {
            Long inputLong = (Long) input;
            return (inputLong == 0) ? ByteUtil.EMPTY_BYTE_ARRAY : asUnsignedByteArray(BigInteger.valueOf(inputLong));
        } else if (input instanceof Integer) {
            Integer inputInt = (Integer) input;
            return (inputInt == 0) ? ByteUtil.EMPTY_BYTE_ARRAY : asUnsignedByteArray(BigInteger.valueOf(inputInt));
        } else if (input instanceof BigInteger) {
            BigInteger inputBigInt = (BigInteger) input;
            return (inputBigInt.equals(BigInteger.ZERO)) ? ByteUtil.EMPTY_BYTE_ARRAY : asUnsignedByteArray(inputBigInt);
        }
        throw new RuntimeException("Unsupported type: Only accepting String, Integer and BigInteger for now");
    }
88092
public static long readLong(InputStream source) throws IOException {
        int b1 = source.read();
        int b2 = source.read();
        int b3 = source.read();
        int b4 = source.read();
        int b5 = source.read();
        int b6 = source.read();
        int b7 = source.read();
        int b8 = source.read();
        if ((b1 | b2 | b3 | b4 | b5 | b6 | b7 | b8) < 0) {
            throw new EOFException();
        } else {
            return ((long) b1 << 56) +
                    ((long) (b2 & 255) << 48) +
                    ((long) (b3 & 255) << 40) +
                    ((long) (b4 & 255) << 32) +
                    ((long) (b5 & 255) << 24) +
                    (long) ((b6 & 255) << 16) +
                    (long) ((b7 & 255) << 8) +
                    (long) ((b8 & 255));
        }
    }
214137
private boolean isLongAccess(MethodLiteral<?, ?> method) {
    boolean result = method.getReturnType().getRawType().equals(Long.TYPE);
    for (TypeLiteral<?> paramLiteral : method.getParameterTypes()) {
      result |= paramLiteral.getRawType().equals(Long.TYPE);
    }

    return result;
  }
452664
@Override
    public boolean isValid(Object input) {
        int value;
        try {
            value = Integer.parseInt(input.toString());
        } catch (NumberFormatException e) {
            return false;
        }

        if (minAllowedValue != null && value < minAllowedValue)
            return false;
        if (maxAllowedValue != null && value > maxAllowedValue)
            return false;
        return true;
    }
721111
public static boolean isAlphanumeric(final String input) {
        for (int i = 0; i < input.length(); i++) {
            if (!Character.isLetterOrDigit(input.charAt(i))) return false;
        }
        return true;
    }
1193535
public static final long getLong(InputStream is) throws IOException
   {
      byte[] data = new byte[8];
      is.read(data);
      return getLong(data, 0);
   }
841180
public static void hasLength(String input, int length, String message) {

    notNull(input, message);
    if (input.trim().length() != length) {
      throw new IllegalArgumentException(message);
    }
  }