public class StreamSerializer extends StdSerializer<Stream<?>> implements ContextualSerializer
JsonSerializer.None_handledType| Constructor and Description |
|---|
StreamSerializer(JavaType streamType,
JavaType elemType)
Constructor
|
StreamSerializer(JavaType streamType,
JavaType elemType,
JsonSerializer<Object> elemSerializer)
Constructor with custom serializer
|
| Modifier and Type | Method and Description |
|---|---|
JsonSerializer<?> |
createContextual(SerializerProvider provider,
BeanProperty property)
Method called to see if a different (or differently configured) serializer
is needed to serialize values of specified property.
|
void |
serialize(Stream<?> stream,
JsonGenerator jgen,
SerializerProvider provider)
Method that can be called to ask implementation to serialize
values of type this serializer handles.
|
_neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrowgetDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterIdpublic StreamSerializer(JavaType streamType, JavaType elemType)
streamType - Stream typeelemType - Stream elements type (matching T)public StreamSerializer(JavaType streamType, JavaType elemType, JsonSerializer<Object> elemSerializer)
streamType - Stream typeelemType - Stream elements type (matching T)elemSerializer - Custom serializer to use for element typepublic JsonSerializer<?> createContextual(SerializerProvider provider, BeanProperty property) throws JsonMappingException
ContextualSerializercreateContextual in interface ContextualSerializerprovider - Serializer provider to use for accessing config, other serializersproperty - Method or field that represents the property
(and is used to access value to serialize).
Should be available; but there may be cases where caller cannot provide it and
null is passed instead (in which case impls usually pass 'this' serializer as is)JsonMappingExceptionpublic void serialize(Stream<?> stream, JsonGenerator jgen, SerializerProvider provider) throws IOException
JsonSerializerserialize in class StdSerializer<Stream<?>>stream - Value to serialize; can not be null.jgen - Generator used to output resulting Json contentprovider - Provider that can be used to get serializers for
serializing Objects value contains, if any.IOExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.