Class ByteArraySerializer
java.lang.Object
org.eclipse.yasson.internal.serializer.AbstractItem<T>
org.eclipse.yasson.internal.serializer.AbstractContainerSerializer<T>
org.eclipse.yasson.internal.serializer.AbstractArraySerializer<byte[]>
org.eclipse.yasson.internal.serializer.ByteArraySerializer
- All Implemented Interfaces:
javax.json.bind.serializer.JsonbSerializer<byte[]>
,RuntimeTypeInfo
,CurrentItem<byte[]>
,EmbeddedItem
Serializes byte array as JSON array of ints.
-
Constructor Summary
ModifierConstructorDescriptionprotected
ByteArraySerializer(SerializerBuilder builder)
Creates new instance of byte array serializer. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
serializeInternal(byte[] obj, javax.json.stream.JsonGenerator generator, javax.json.bind.serializer.SerializationContext ctx)
Serialize content of provided container.Methods inherited from class org.eclipse.yasson.internal.serializer.AbstractArraySerializer
writeStart, writeStart
Methods inherited from class org.eclipse.yasson.internal.serializer.AbstractContainerSerializer
addValueSerializer, beforeSerialize, getValueSerializer, getValueType, serialize, serializeItem, serializerCaptor, writeEnd
Methods inherited from class org.eclipse.yasson.internal.serializer.AbstractItem
getClassModel, getRuntimeType, getWrapper
-
Constructor Details
-
ByteArraySerializer
Creates new instance of byte array serializer.- Parameters:
builder
- serializer builder
-
-
Method Details
-
serializeInternal
protected void serializeInternal(byte[] obj, javax.json.stream.JsonGenerator generator, javax.json.bind.serializer.SerializationContext ctx)Description copied from class:AbstractContainerSerializer
Serialize content of provided container.- Specified by:
serializeInternal
in classAbstractContainerSerializer<byte[]>
- Parameters:
obj
- container to be serializedgenerator
- JSON format generatorctx
- JSON serialization context
-