public class SqlBlobSerializer extends StdScalarSerializer<Blob>
Blob to write as binary
(for JSON and other formats Base64-encoded String, for binary formats as
true binary).ByteArraySerializer,
Serialized FormJsonSerializer.None_handledType| Constructor and Description |
|---|
SqlBlobSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_writeValue(Blob value,
JsonGenerator gen,
SerializerProvider ctxt) |
void |
acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor,
JavaType typeHint)
Default implementation specifies no format.
|
boolean |
isEmpty(SerializerProvider provider,
Blob value)
Method called to check whether given serializable value is
considered "empty" value (for purposes of suppressing serialization
of empty values).
|
void |
serialize(Blob value,
JsonGenerator gen,
SerializerProvider ctxt)
Method that can be called to ask implementation to serialize
values of type this serializer handles.
|
void |
serializeWithType(Blob value,
JsonGenerator gen,
SerializerProvider ctxt,
TypeSerializer typeSer)
Default implementation will write type prefix, call regular serialization
method (since assumption is that value itself does not need JSON
Array or Object start/end markers), and then write type suffix.
|
getSchema_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrowgetDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterIdpublic boolean isEmpty(SerializerProvider provider, Blob value)
JsonSerializerDefault implementation will consider only null values to be empty.
NOTE: replaces JsonSerializer.isEmpty(Object), which was deprecated in 2.5
isEmpty in class JsonSerializer<Blob>public void serialize(Blob value, JsonGenerator gen, SerializerProvider ctxt) throws IOException
JsonSerializerserialize in class StdSerializer<Blob>value - Value to serialize; can not be null.gen - Generator used to output resulting Json contentctxt - Provider that can be used to get serializers for
serializing Objects value contains, if any.IOExceptionpublic void serializeWithType(Blob value, JsonGenerator gen, SerializerProvider ctxt, TypeSerializer typeSer) throws IOException
StdScalarSerializerserializeWithType in class StdScalarSerializer<Blob>value - Value to serialize; can not be null.gen - Generator used to output resulting Json contentctxt - Provider that can be used to get serializers for
serializing Objects value contains, if any.typeSer - Type serializer to use for including type informationIOExceptionprotected void _writeValue(Blob value, JsonGenerator gen, SerializerProvider ctxt) throws IOException
IOExceptionpublic void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException
StdSerializeracceptJsonFormatVisitor in interface JsonFormatVisitableacceptJsonFormatVisitor in class StdScalarSerializer<Blob>typeHint - Type of element (entity like property) being visitedJsonMappingExceptionCopyright © 2008–2020 FasterXML. All rights reserved.