Class DefaultConverters.ByteArrayConverter

    • Method Detail

      • serialize

        public void serialize​(byte[] object,
                              ObjectWriter writer,
                              Context ctx)
        Specified by:
        serialize in interface Converter<byte[]>
        Specified by:
        serialize in interface Serializer<byte[]>
        Parameters:
        object - we want to serialize. The object is of type T or a subclass (if this serializer has been registered for subclasses).
        writer - to use to write data to the output stream.
        ctx - the current context.
      • deserialize

        public byte[] deserialize​(ObjectReader reader,
                                  Context ctx)
        Specified by:
        deserialize in interface Converter<byte[]>
        Specified by:
        deserialize in interface Deserializer<byte[]>
        Parameters:
        reader - used to read data from.
        ctx - the current context.
        Returns:
        an instance of T or a subclass of T.