String (String value) { // see RFC 2254 String escapedStr = value; escapedStr = escapedStr.replaceAll("\\\\", "\\\\5c"); escapedStr = escapedStr.replaceAll("\\*", "\\\\2a"); escapedStr = escapedStr.replaceAll("\\(", "\\\\28"); escapedStr = escapedStr.replaceAll("\\)", "\\\\29"); return escapedStr; }