Code example for BigInteger

0
    private static boolean isHex(String value) {
        try { 
            new BigInteger(value, 16);
            return true; 
        } catch (NumberFormatException e) {
            System.logW("Could not parse hex value " + value, e);
            return false; 
        } 
    } 
 
    private static boolean isPubkeyHash(String value) {
        if (value.length() != 40) {
            System.logW("Invalid pubkey hash length: " + value.length());
            return false; 
         } 
         return isHex(value);
    } 
 
    private static String readBlacklist(String path) {
        try { 
            return IoUtils.readFileAsString(path);