hashcode/qualification-round/src/main/java/fr/mashbarth/hashcode/qualificationround/Launcher.java
/**
     * Read a resource line by line.
     * A simple example of reading a resource line by line.
     *
     * @param resourceName the name of the resource.
     */
Read a resource line by line.
A simple example of reading a resource line by line.

@param resourceName the name of the resource.
Read a resource line by line . A simple example of reading a resource line by line . @param resourceName the name of the resource .
public static void readResource(String resourceName) {
        try {
            final InputStream inputStream = resourceName.getClass().getResourceAsStream(resourceName);
            final InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
            final BufferedReader br = new BufferedReader(inputStreamReader);
            String line;
            while ((line = br.readLine()) != null) {
                System.out.println(line);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
public static void readResource ( String resourceName ) { try { final InputStream inputStream = resourceName . getClass ( ) . getResourceAsStream ( resourceName ) ; final InputStreamReader inputStreamReader = new InputStreamReader ( inputStream ) ; final BufferedReader br = new BufferedReader ( inputStreamReader ) ; String line ; while ( ( line = br . readLine ( ) ) != null ) { System . out . println ( line ) ; } } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
Read a resource line by line.
Read a resource line by line .
// TODO process the line