ThriftIO { public static <T> ReadFiles<T> readFiles(Class<T> recordClass) { return new AutoValue_ThriftIO_ReadFiles.Builder<T>().setRecordClass(recordClass).build(); } private  ThriftIO(); static ReadFiles<T> readFiles(Class<T> recordClass); static Sink<T> sink(TProtocolFactory factory);  }
@Test public void testReadFilesBinaryProtocol() { PCollection<TestThriftStruct> testThriftDoc = mainPipeline .apply(Create.of(THRIFT_DIR + "data").withCoder(StringUtf8Coder.of())) .apply(FileIO.matchAll()) .apply(FileIO.readMatches()) .apply(ThriftIO.readFiles(TestThriftStruct.class).withProtocol(tBinaryProtoFactory)); PAssert.that(testThriftDoc).containsInAnyOrder(TEST_THRIFT_STRUCT); mainPipeline.run(); }