Here you can find the source of quoteEscaped(String input)
public static String quoteEscaped(String input)
//package com.java2s; //License from project: Apache License public class Main { public static String quoteEscaped(String input) { return input.replace("\\", "\\\\").replace("\"", "\\\"").replaceAll("[\\p{Z}\\s]", " ").trim(); }/*from w ww . j ava2 s . c o m*/ }