Class ByteArrayAdapter
- java.lang.Object
-
- io.ultreia.java4all.util.json.adapters.ByteArrayAdapter
-
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<byte[]>,com.google.gson.JsonSerializer<byte[]>,JsonAdapter
@AutoService(JsonAdapter.class) public class ByteArrayAdapter extends Object implements com.google.gson.JsonSerializer<byte[]>, com.google.gson.JsonDeserializer<byte[]>, JsonAdapter
- Since:
- 1.1.0
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Constructor Summary
Constructors Constructor Description ByteArrayAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context)com.google.gson.JsonElementserialize(byte[] src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)Class<?>type()
-
-
-
Method Detail
-
type
public Class<?> type()
- Specified by:
typein interfaceJsonAdapter
-
deserialize
public byte[] deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException- Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<byte[]>- Throws:
com.google.gson.JsonParseException
-
serialize
public com.google.gson.JsonElement serialize(byte[] src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)- Specified by:
serializein interfacecom.google.gson.JsonSerializer<byte[]>
-
-