buffer.append((char)'\\');
buffer.append('\\');
    public static String quoteMeta(String literal) {        int len = literal.length();        StringBuffer buffer = null;        for (int i = 0;  i < len;  i ++) {            int ch = literal.charAt(i);            if (".*+?{[()|\\^$".indexOf(ch) >= 0) {                if (buffer == null) {                    buffer = new StringBuffer(i+(len-i)*2);                    if (i > 0)  buffer.append(literal.substring(0, i));                }                buffer.append((char)'\\');            } else if (buffer != null)                buffer.append((char)ch);        }        return buffer != null ? buffer.toString() : literal;    }