Class ByteArrayGsonConverter

Object
ByteArrayGsonConverter
All Implemented Interfaces:
JsonDeserializer<byte[]>, JsonSerializer<byte[]>

public class ByteArrayGsonConverter extends Object implements JsonSerializer<byte[]>, JsonDeserializer<byte[]>
  • Constructor Details

    • ByteArrayGsonConverter

      public ByteArrayGsonConverter()
  • Method Details

    • deserialize

      public byte[] deserialize(JsonElement element, Type type, JsonDeserializationContext context) throws JsonParseException
      Specified by:
      deserialize in interface JsonDeserializer<byte[]>
      Throws:
      JsonParseException
    • serialize

      public JsonElement serialize(byte[] data, Type type, JsonSerializationContext context)
      Specified by:
      serialize in interface JsonSerializer<byte[]>