public static Collection<IJsonNode> readFromFile( final File file, final SopremoFormat format, final SopremoRecordLayout layout) throws IOException { Configuration config = new Configuration(); final EvaluationContext context = new EvaluationContext(); SopremoUtil.setEvaluationContext(config, context); SopremoUtil.setLayout(config, layout); SopremoUtil.transferFieldsToConfiguration( format, SopremoFormat.class, config, format.getInputFormat(), InputFormat.class); @SuppressWarnings("unchecked") final SopremoFileInputFormat inputFormat = FormatUtil.openInput( (Class<? extends SopremoFileInputFormat>) format.getInputFormat(), file.toURI().toString(), config); List<IJsonNode> values = new ArrayList<IJsonNode>(); while (!inputFormat.reachedEnd()) { final SopremoRecord record = new SopremoRecord(layout); if (inputFormat.nextRecord(record)) values.add(record.getNode().clone()); } inputFormat.close(); return values; }