Package com.microsoft.rest.serializer
Class ByteArraySerializer
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializer<Byte[]>
-
- com.microsoft.rest.serializer.ByteArraySerializer
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
public final class ByteArraySerializer extends com.fasterxml.jackson.databind.JsonSerializer<Byte[]>
Custom serializer for serializingByte[]objects into Base64 strings.
-
-
Constructor Summary
Constructors Constructor Description ByteArraySerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.module.SimpleModulegetModule()Gets a module wrapping this serializer as an adapter for the Jackson ObjectMapper.voidserialize(Byte[] value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider)
-
-
-
Method Detail
-
getModule
public static com.fasterxml.jackson.databind.module.SimpleModule getModule()
Gets a module wrapping this serializer as an adapter for the Jackson ObjectMapper.- Returns:
- a simple module to be plugged onto Jackson ObjectMapper.
-
serialize
public void serialize(Byte[] value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
- Specified by:
serializein classcom.fasterxml.jackson.databind.JsonSerializer<Byte[]>- Throws:
IOException
-
-