Class SerializingConverter

  • java.lang.Object
  • All Implemented Interfaces:

    public class SerializingConverter
    extends java.lang.Object
    implements Converter<java.lang.Object,byte[]>
    A Converter that delegates to a Serializer to convert an object to a byte array.
    Gary Russell, Mark Fisher
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      byte[] convert(java.lang.Object source)
      Serializes the source object and returns the byte array result.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SerializingConverter

        public SerializingConverter()
        Create a default SerializingConverter that uses standard Java serialization.
      • SerializingConverter

        public SerializingConverter(Serializer<java.lang.Object> serializer)
        Create a SerializingConverter that delegates to the provided Serializer.
    • Method Detail

      • convert

        public byte[] convert(java.lang.Object source)
        Serializes the source object and returns the byte array result.
        Specified by:
        convert in interface Converter<java.lang.Object,byte[]>
        source - the source object to convert, which must be an instance of S (never null)
        the converted object, which must be an instance of T (potentially null)