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, wrapAndThrow
getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId
public boolean isEmpty(SerializerProvider provider, Blob value)
JsonSerializer
Default 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
JsonSerializer
serialize
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.IOException
public void serializeWithType(Blob value, JsonGenerator gen, SerializerProvider ctxt, TypeSerializer typeSer) throws IOException
StdScalarSerializer
serializeWithType
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 informationIOException
protected void _writeValue(Blob value, JsonGenerator gen, SerializerProvider ctxt) throws IOException
IOException
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException
StdSerializer
acceptJsonFormatVisitor
in interface JsonFormatVisitable
acceptJsonFormatVisitor
in class StdScalarSerializer<Blob>
typeHint
- Type of element (entity like property) being visitedJsonMappingException
Copyright © 2008–2021 FasterXML. All rights reserved.