public static String percentEncode(String string) {
        String encoded = formURLEncode(string);

        for (EncodingRule rule : ENCODING_RULES) {
            encoded = rule.apply(encoded);
        }

        return encoded;
    }
public static String percentEncode(String string) {
        String encoded = formURLEncode(string);

        for (EncodingRule rule : ENCODING_RULES) {
            encoded = rule.apply(encoded);
        }

        return encoded;
    }
public static String percentEncode ( String string ) { String encoded = formURLEncode ( string ) ; for ( EncodingRule rule : ENCODING_RULES ) { encoded = rule . apply ( encoded ) ; } return encoded ; }
Percent encodes a string

@param string plain string
@return percent encoded string
Percent encodes a string