Class ByteArraySerializer

All Implemented Interfaces:
javax.json.bind.serializer.JsonbSerializer<byte[]>, RuntimeTypeInfo, CurrentItem<byte[]>, EmbeddedItem

public class ByteArraySerializer extends AbstractArraySerializer<byte[]>
Serializes byte array as JSON array of ints.
  • Constructor Details

    • ByteArraySerializer

      protected ByteArraySerializer(SerializerBuilder builder)
      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 class AbstractContainerSerializer<byte[]>
      Parameters:
      obj - container to be serialized
      generator - JSON format generator
      ctx - JSON serialization context