class AvroSchemaFileReaderFactory {

    public AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile) {
        if (userProvidedSchemaFile.matches("^.*\\.avsc$")) {
            return new JsonAvroSchemaFileReader();
        }
        return new BinaryAvroSchemaFileReader();
    }

}