public void buildDatabase() {
        this.lineCount = 0;
        try {
            while (this.bufrReader.ready()) {
                this.process(this.bufrReader.readLine() + '\n');
                this.lineCount++;
            }
            this.bufrReader.close();
        } // print the error
        catch (IOException ex) {
            System.out.println(ex);
            for (StackTraceElement el : ex.getStackTrace()) {
                System.out.println(el);
            }
        } finally {
            this.writer.close();
        }
    }