Class ApacheAvroSerializer
java.lang.Object
com.azure.core.serializer.avro.apache.ApacheAvroSerializer
- All Implemented Interfaces:
AvroSerializer
,ObjectSerializer
Apache Avro based implementation of the
AvroSerializer
interface.-
Method Summary
Modifier and TypeMethodDescription<T> T
deserialize
(InputStream stream, TypeReference<T> typeReference) Reads an Avro stream into its object representation.<T> Mono<T>
deserializeAsync
(InputStream stream, TypeReference<T> typeReference) Reads an Avro stream into its object representation.<T> T
deserializeFromBytes
(byte[] data, TypeReference<T> typeReference) Reads an Avro byte array into its object representation.<T> Mono<T>
deserializeFromBytesAsync
(byte[] data, TypeReference<T> typeReference) Reads an Avro byte array into its object representation.void
serialize
(OutputStream stream, Object value) Writes an object's Avro representation into a stream.serializeAsync
(OutputStream stream, Object value) Writes an object's Avro representation into a stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.core.experimental.serializer.AvroSerializer
serializeToBytes, serializeToBytesAsync
-
Method Details
-
deserializeFromBytes
Description copied from interface:AvroSerializer
Reads an Avro byte array into its object representation.- Specified by:
deserializeFromBytes
in interfaceAvroSerializer
- Specified by:
deserializeFromBytes
in interfaceObjectSerializer
- Type Parameters:
T
- Type of the object.- Parameters:
data
- Avro byte array.typeReference
-TypeReference
representing the object.- Returns:
- The object represented by the deserialized Avro byte array.
-
deserialize
Description copied from interface:AvroSerializer
Reads an Avro stream into its object representation.- Specified by:
deserialize
in interfaceAvroSerializer
- Specified by:
deserialize
in interfaceObjectSerializer
- Type Parameters:
T
- Type of the object.- Parameters:
stream
- Avro stream.typeReference
-TypeReference
representing the object.- Returns:
- The object represented by the deserialized Avro stream.
-
deserializeFromBytesAsync
Description copied from interface:AvroSerializer
Reads an Avro byte array into its object representation.- Specified by:
deserializeFromBytesAsync
in interfaceAvroSerializer
- Specified by:
deserializeFromBytesAsync
in interfaceObjectSerializer
- Type Parameters:
T
- Type of the object.- Parameters:
data
- Avro byte array.typeReference
-TypeReference
representing the object.- Returns:
- Reactive stream that emits the object represented by the deserialized Avro byte array.
-
deserializeAsync
Description copied from interface:AvroSerializer
Reads an Avro stream into its object representation.- Specified by:
deserializeAsync
in interfaceAvroSerializer
- Specified by:
deserializeAsync
in interfaceObjectSerializer
- Type Parameters:
T
- Type of the object.- Parameters:
stream
- Avro stream.typeReference
-TypeReference
representing the object.- Returns:
- Reactive stream that emits the object represented by the deserialized Avro stream.
-
serialize
Description copied from interface:AvroSerializer
Writes an object's Avro representation into a stream.- Specified by:
serialize
in interfaceAvroSerializer
- Specified by:
serialize
in interfaceObjectSerializer
- Parameters:
stream
-OutputStream
where the object's Avro representation will be written.value
- The object.
-
serializeAsync
Description copied from interface:AvroSerializer
Writes an object's Avro representation into a stream.- Specified by:
serializeAsync
in interfaceAvroSerializer
- Specified by:
serializeAsync
in interfaceObjectSerializer
- Parameters:
stream
-OutputStream
where the object's Avro representation will be written.value
- The object.- Returns:
- Reactive stream that will indicate operation completion.
-