Hello,
I am trying to parse a 75mb .list /.txt file to the screen first then eventually to the DB if it ever works.
I am trying to use Scanner and it stops readinglines after 9-10 lines and the application commences properly no crash no nothing. The file i m trying to read is 100000 line-long IMDB rating.list file.
Should i do some memory management or smth?
Thanks in advance.
Part of my code;
... try { scanner.findWithinHorizon("Title", 0); while (scanner.hasNextLine()) { String nextLine = scanner.nextLine(); System.out.println(nextLine); if (!isValid(nextLine)) { continue; } processLine(nextLine); } } catch (Exception e) { e.printStackTrace(); } finally { scanner.close(); } ... //For each line i use another scanner private void processLine(String aLine) { lineScanner = new Scanner(aLine); lineScanner.useDelimiter("\\s{2,}"); //process the line... }