Exemple #1
0
 default Mappings parse(Readable readable) throws IOException {
   LineReader lineReader = new LineReader(readable);
   LineProcessor<Mappings> lineProcessor = createLineProcessor();
   String line;
   while ((line = lineReader.readLine()) != null) {
     if (!lineProcessor.processLine(line)) {
       break;
     }
   }
   return lineProcessor.getResult();
 }
Exemple #2
0
 default Mappings parseLines(Iterator<String> lines) {
   LineProcessor<Mappings> lineProcessor = createLineProcessor();
   lines.forEachRemaining(Exceptions.sneakyThrowing(lineProcessor::processLine));
   return lineProcessor.getResult();
 }