@Test public void testBytesToStringConversion() { final Charset charset = Charset.forName("UTF_32LE"); Object o = AvroTypeUtil.convertToAvroObject("Hello".getBytes(charset), Schema.create(Type.STRING), charset); assertTrue(o instanceof String); assertEquals("Hello", o); }
public static Object convertToAvroObject(final Object rawValue, final Schema fieldSchema) { return convertToAvroObject(rawValue, fieldSchema, StandardCharsets.UTF_8); }
AvroTypeUtil { public static Object convertToAvroObject(final Object rawValue, final Schema fieldSchema) { return convertToAvroObject(rawValue, fieldSchema, StandardCharsets.UTF_8); } }
AvroTypeUtil { public static Object convertToAvroObject(final Object rawValue, final Schema fieldSchema) { return convertToAvroObject(rawValue, fieldSchema, StandardCharsets.UTF_8); }  }
AvroTypeUtil { public static Object convertToAvroObject(final Object rawValue, final Schema fieldSchema) { return convertToAvroObject(rawValue, fieldSchema, StandardCharsets.UTF_8); }  static Schema extractAvroSchema(final RecordSchema recordSchema); static DataType determineDataType(final Schema avroSchema); static DataType determineDataType(final Schema avroSchema, Map<String, DataType> knownRecordTypes); static RecordSchema createSchema(final Schema avroSchema); static RecordSchema createSchema(final Schema avroSchema, final String schemaText, final SchemaIdentifier schemaId); static boolean isNullable(final Schema schema); static Object[] convertByteArray(final byte[] bytes); static ByteBuffer convertByteArray(final Object[] bytes); static GenericRecord createAvroRecord(final Record record, final Schema avroSchema); static GenericRecord createAvroRecord(final Record record, final Schema avroSchema, final Charset charset); static Object convertToAvroObject(final Object rawValue, final Schema fieldSchema); static Object convertToAvroObject(final Object rawValue, final Schema fieldSchema, final Charset charset); static Map<String, Object> convertAvroRecordToMap(final GenericRecord avroRecord, final RecordSchema recordSchema); static Map<String, Object> convertAvroRecordToMap(final GenericRecord avroRecord, final RecordSchema recordSchema, final Charset charset); }
AvroTypeUtil { public static Object convertToAvroObject(final Object rawValue, final Schema fieldSchema) { return convertToAvroObject(rawValue, fieldSchema, StandardCharsets.UTF_8); }  static Schema extractAvroSchema(final RecordSchema recordSchema); static DataType determineDataType(final Schema avroSchema); static DataType determineDataType(final Schema avroSchema, Map<String, DataType> knownRecordTypes); static RecordSchema createSchema(final Schema avroSchema); static RecordSchema createSchema(final Schema avroSchema, final String schemaText, final SchemaIdentifier schemaId); static boolean isNullable(final Schema schema); static Object[] convertByteArray(final byte[] bytes); static ByteBuffer convertByteArray(final Object[] bytes); static GenericRecord createAvroRecord(final Record record, final Schema avroSchema); static GenericRecord createAvroRecord(final Record record, final Schema avroSchema, final Charset charset); static Object convertToAvroObject(final Object rawValue, final Schema fieldSchema); static Object convertToAvroObject(final Object rawValue, final Schema fieldSchema, final Charset charset); static Map<String, Object> convertAvroRecordToMap(final GenericRecord avroRecord, final RecordSchema recordSchema); static Map<String, Object> convertAvroRecordToMap(final GenericRecord avroRecord, final RecordSchema recordSchema, final Charset charset); static final String AVRO_SCHEMA_FORMAT; }