The CONECT and HETATM lines are now read correctly for files with more than 9999 particles. It also allows for a space separated format for the CONECT lines.
For the HETATM lines previously the function lineStartsWithToken was used to check whether a line started with "HETATM". This function however assumes the keyword is followed by a space or an endofline character, which is not necessarily the case for pdbfiles.
Finally I added a pdb file which can be used to test this functionality.