Here you can find the source of extractTableName(String line)
protected static String extractTableName(String line)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { protected static String extractTableName(String line) { List<Integer> indices = getQuotePositions(line); if (indices.size() < 4) { return ""; }/* w w w .ja v a 2s .co m*/ return line.substring(indices.get(0), indices.get(3) + 1); } protected static List<Integer> getQuotePositions(String line) { List<Integer> indices = new ArrayList<>(); char[] chars = line.toCharArray(); for (int i = 0; i < chars.length; i++) { if (chars[i] == '"') { indices.add(i); } } return indices; } }