Here you can find the source of readWholeString(Scanner s)
private static String readWholeString(Scanner s)
//package com.java2s; //License from project: Open Source License import java.util.Scanner; public class Main { private static String readWholeString(Scanner s) { return s.useDelimiter("\\A").hasNext() ? s.next() : ""; }//from www . j a va 2s . c o m }