Here you can find the source of quote(String text)
public static String quote(String text)
//package com.java2s; /******************************************************************************* * Copyright (c) 2004-2010 Sunil Kamath (IcemanK). * All rights reserved./*w w w.ja va 2 s . c o m*/ * This program is made available under the terms of the Common Public License * v1.0 which is available at http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * Sunil Kamath (IcemanK) - initial API and implementation * *******************************************************************************/ public class Main { public static String quote(String text) { return new StringBuffer("\"").append(text).append("\"").toString(); //$NON-NLS-1$ //$NON-NLS-2$ } public static String toString(Object object, String defaultValue) { if (object == null) { return defaultValue; } else { return object.toString(); } } }