code: public static boolean isLong(String s) {
          if (s == null) {
              return false;
          }
          try {
              Long.parseLong(s.trim());
          } catch (NumberFormatException e) {
              return false;
          }
          return true;
      }
docs: Validate if the given string is a long
  @param s
  @return