Class ByteArraySerializer
- java.lang.Object
-
- com.github.katenachain.serializer.adapter.ByteArraySerializer
-
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<byte[]>,com.google.gson.JsonSerializer<byte[]>
public class ByteArraySerializer extends Object implements com.google.gson.JsonSerializer<byte[]>, com.google.gson.JsonDeserializer<byte[]>
The type Byte array serializer.
-
-
Constructor Summary
Constructors Constructor Description ByteArraySerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]deserialize(com.google.gson.JsonElement jsonElement, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext)ByteArray deserializecom.google.gson.JsonElementserialize(byte[] data, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)ByteArray serialize
-
-
-
Method Detail
-
serialize
public com.google.gson.JsonElement serialize(byte[] data, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)ByteArray serialize- Specified by:
serializein interfacecom.google.gson.JsonSerializer<byte[]>- Parameters:
data- byte[]type- TypejsonSerializationContext- JsonSerializationContext- Returns:
- JsonElement
-
deserialize
public byte[] deserialize(com.google.gson.JsonElement jsonElement, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext)ByteArray deserialize- Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<byte[]>- Parameters:
jsonElement- JsonElementtype- TypejsonDeserializationContext- JsonDeserializationContext- Returns:
- byte[]
-
-