final Schema schema = SpecificData.get().getSchema(recordClass);
switch (inFormat) {
case AVRO:
return new AvroGenericSource(in, schema);
case MSGPACK:
return new ValueToAvro<>(new ValueSource(in), schema);
case JSON:
return new JsonNodeToAvro<>(new JsonNodeSource(in), schema);
case CSV:
return new StringListToAvro<>(new CsvWithHeaderSource(new InputStreamReader(in)), schema);
case CSV_NO_HEADER: