@Test public void testGetBinaryReader() { assertTrue(avroSchemaFileReaderFactory.getAvroSchemaFileReader("foobar.avro") instanceof BinaryAvroSchemaFileReader); }
public AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile) { if (userProvidedSchemaFile.matches("^.*\\.avsc$")) { return new JsonAvroSchemaFileReader(); } return new BinaryAvroSchemaFileReader(); }
AvroSchemaFileReaderFactory { public AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile) { if (userProvidedSchemaFile.matches("^.*\\.avsc$")) { return new JsonAvroSchemaFileReader(); } return new BinaryAvroSchemaFileReader(); } }
AvroSchemaFileReaderFactory { public AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile) { if (userProvidedSchemaFile.matches("^.*\\.avsc$")) { return new JsonAvroSchemaFileReader(); } return new BinaryAvroSchemaFileReader(); }  }
AvroSchemaFileReaderFactory { public AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile) { if (userProvidedSchemaFile.matches("^.*\\.avsc$")) { return new JsonAvroSchemaFileReader(); } return new BinaryAvroSchemaFileReader(); }  static AvroSchemaFileReaderFactory getInstance(); AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile); }
AvroSchemaFileReaderFactory { public AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile) { if (userProvidedSchemaFile.matches("^.*\\.avsc$")) { return new JsonAvroSchemaFileReader(); } return new BinaryAvroSchemaFileReader(); }  static AvroSchemaFileReaderFactory getInstance(); AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile);  }