private Decoder getColumnDecoder ( Schema writtenFieldAvroSchema , InputStream in ) { // Use a special Avro decoder that has special handling for int, long, // and String types. See ColumnDecoder for more information. if ( writtenFieldAvroSchema . getType ( ) == Type . INT || writtenFieldAvroSchema . getType ( ) == Type . LONG || writtenFieldAvroSchema . getType ( ) == Type . STRING ) { return new ColumnDecoder ( in ) ; } else { return DecoderFactory . get ( ) . binaryDecoder ( in , null ) ; } }
Returns an Avro Decoder . The implementation it chooses will depend on the schema of the field .