Here you can find the source of doubleQuote(String str)
public static String doubleQuote(String str)
//package com.java2s; /**//from w w w. ja v a 2 s. com SpagoBI, the Open Source Business Intelligence suite Copyright (C) 2012 Engineering Ingegneria Informatica S.p.A. - SpagoBI Competency Center This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. **/ public class Main { public static String doubleQuote(String str) { return quote(str, '"'); } /** * Inserts a given character at the beginning and at the end of the specified string. * For example if the string is <tt>extreme</tt> and the char is <tt>'</tt> then * the returned string is <tt>'exterme'</tt>. */ public static String quote(String str, char c) { assert (str != null); StringBuffer buffer = new StringBuffer(str.length() + 2); buffer.append(c); buffer.append(str); buffer.append(c); return buffer.toString(); } }