Class ByteWrapperArrayCodec

  • All Implemented Interfaces:
    org.bson.codecs.Codec<Byte[]>, org.bson.codecs.Decoder<Byte[]>, org.bson.codecs.Encoder<Byte[]>

    public class ByteWrapperArrayCodec
    extends Object
    implements org.bson.codecs.Codec<Byte[]>
    Encodes a Byte[] to BinData like the driver's ByteArrayCodec does for byte[]
    Since:
    2.1.5
    • Constructor Detail

      • ByteWrapperArrayCodec

        public ByteWrapperArrayCodec()
    • Method Detail

      • decode

        public Byte[] decode​(org.bson.BsonReader reader,
                             org.bson.codecs.DecoderContext decoderContext)
        Specified by:
        decode in interface org.bson.codecs.Decoder<Byte[]>
      • encode

        public void encode​(org.bson.BsonWriter writer,
                           Byte[] value,
                           org.bson.codecs.EncoderContext encoderContext)
        Specified by:
        encode in interface org.bson.codecs.Encoder<Byte[]>
      • getEncoderClass

        public Class<Byte[]> getEncoderClass()
        Specified by:
        getEncoderClass in interface org.bson.codecs.Encoder<Byte[]>