ObjectSerializer Interface
public interface ObjectSerializer
Generic interface covering serializing and deserialization objects.
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract T |
deserialize(InputStream stream, TypeReference<T> typeReference)
Reads a stream into its object representation. |
abstract Mono<T> |
deserializeAsync(InputStream stream, TypeReference<T> typeReference)
Reads a stream into its object representation. |
default T |
deserializeFromBytes(byte[] data, TypeReference<T> typeReference)
Reads a byte array into its object representation. |
default Mono<T> |
deserializeFromBytesAsync(byte[] data, TypeReference<T> typeReference)
Reads a byte array into its object representation. |
abstract void |
serialize(OutputStream stream, Object value)
Writes the serialized object into a stream. |
abstract Mono<Void> |
serializeAsync(OutputStream stream, Object value)
Writes the serialized object into a stream. |
default byte[] |
serializeToBytes(Object value)
Converts the object into a byte array. |
default Mono<byte[]> |
serializeToBytesAsync(Object value)
Converts the object into a byte array. |
Method Details
deserialize
public abstract T
Reads a stream into its object representation.
Parameters:
Returns:
deserializeAsync
public abstract Mono
Reads a stream into its object representation.
Parameters:
Returns:
deserializeFromBytes
public default T
Reads a byte array into its object representation.
Parameters:
Returns:
deserializeFromBytesAsync
public default Mono
Reads a byte array into its object representation.
Parameters:
Returns:
serialize
public abstract void serialize(OutputStream stream, Object value)
Writes the serialized object into a stream.
Parameters:
serializeAsync
public abstract Mono
Writes the serialized object into a stream.
Parameters:
Returns:
serializeToBytes
public default byte[] serializeToBytes(Object value)
Converts the object into a byte array.
Parameters:
Returns:
serializeToBytesAsync
public default Mono
Converts the object into a byte array.
Parameters:
Returns:
Applies to
Azure SDK for Java
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour