I read in the contents of my File
likewise:
List<String> list = new ArrayList();
Scanner scanner = new Scanner(new FileInputStream(file));
while( scanner.hasNextLine())
{
list.add(scanner.nextLine());
}
At the EOF
I want to send the String "@@@"
to act as a Sentinel Value to know that its the end. However, I do not have "@@@"
in the File
that is being read into. Any suggestions on how I might approach this?