line.indexOf(':')
returns an integer. This means you have while (boolean && int)
which makes no sense in a Java world. You should compare the result of the indexOf
method in order to get there a boolean as well.
Eg:
while((line = reader.readLine()) != null && line.indexOf(':') != -1)