httpservices/src/main/java/ucar/httpservices/Escape.java
public static String backslashEncode(String s)
    {
        StringBuilder buf = new StringBuilder();
        for(int i = 0; i < s.length(); i++) {
            int c = buf.charAt(i);
            if(_MustBackslashEscape.indexOf(c) >= 0)
                buf.append(_BACKSLASHEscape);
            buf.append((char) c);
        }
        return buf.toString();
    }
public static String backslashEncode(String s)
    {
        StringBuilder buf = new StringBuilder();
        for(int i = 0; i < s.length(); i++) {
            int c = buf.charAt(i);
            if(_MustBackslashEscape.indexOf(c) >= 0)
                buf.append(_BACKSLASHEscape);
            buf.append((char) c);
        }
        return buf.toString();
    }
Define the DEFINITIVE URL BACKSLASH escape function.

@param s The string to escape.
@return The escaped expression.