Here you can find the source of getEndLine(String cqlString)
private static int getEndLine(String cqlString)
//package com.java2s; //License from project: Apache License import java.util.Scanner; public class Main { private static int getEndLine(String cqlString) { System.out.println("Get end line"); Scanner scanner = new Scanner(cqlString); int endLine = -1; while (scanner.hasNextLine()) { endLine++;//from ww w .j ava 2s . c om scanner.nextLine(); } return endLine; } }