I'm reading a file with Scanner + System.in. My command in Linux looks like:
cat -A test.txt | java -jar test.jar
I'm reading input like:
Scanner input = new Scanner(System.in);
while (input.hasNextLine())
{
String log_line = input.nextLine();
}
The question is.. How I can stop reading when the end of file is reached?