class MetadataEntityReader {

    public MetadataParsingResult readData(InputStream inputStream, Map<Integer, EntityTypeField> fields)
            throws IOException {
        LineProcessor<MetadataParsingResult> processor =
                new EntityLineProcessor(delimiter, parent, metadataClass, fields);
        try (Reader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) {
            return CharStreams.readLines(reader, processor);
        }
    }

}