Here you can find the source of getNextQuotes(String lastQuotes, int lastType)
private static String getNextQuotes(String lastQuotes, int lastType)
//package com.java2s; //License from project: Apache License import java.sql.Types; public class Main { private static String getNextQuotes(String lastQuotes, int lastType) { StringBuffer quotes = new StringBuffer(); if (lastQuotes.length() == 0) { return "\""; } else {/* w w w.j av a 2 s.c om*/ if (lastType == Types.ARRAY) { int length = lastQuotes.length(); for (int i = 0; i < length; ++i) { quotes.append('\\'); } quotes.append(lastQuotes); } else { quotes.append(lastQuotes).append(lastQuotes); } return quotes.toString(); } } }