in proto-tools/src/main/java/org/apache/avro/tool/ProtoGetSchemaTool.java [26:37]
public int run(InputStream in, PrintStream out, PrintStream err,
List<String> args) throws Exception {
if (args.size() != 1) {
err.println("Expected 1 argument: input_file");
return 1;
}
DataFileReader<Void> reader =
new DataFileReader<>(new FsInput(new Path(args.get(0)), new Configuration()),
new GenericDatumReader<Void>());
out.println(reader.getMetaString("protobuf.generic.schema"));
return 0;
}