Here you can find the source of quote(String name)
public static String quote(String name)
//package com.java2s; //License from project: Open Source License public class Main { public static String quote(String name) { if (name.toLowerCase().indexOf("\\e") > 0) { throw new RuntimeException("Quote method will fail"); }/*from www . j a v a2s . co m*/ return "\\Q" + name + "\\E"; } }