String line = reader.readLine();
while ( line != null ) {
final Matcher m = pat.matcher( line );
if ( m.matches() ) {
Line l = new Line( Integer.parseInt( m.group( 1 ) ), Integer.parseInt( m.group( 2 ) ) );
lines.add( l );
}
line = reader.readLine();
}
reader.close();