Thanks again for your input. I've now fully understood what all of you were saying.
I finally got the free time to continue debugging, and it looks like using:
Is a bad idea. I've changed it to doing:
String header = line_read_from_input.split(" "); header.equals(String prefix);
So it's always correct.
Everything is now perfect. Life is good. Thanks to all and all a good night.