Class StringSerializer

  • All Implemented Interfaces:
    Serializer

    public class StringSerializer
    extends Object
    This Serializer (de)serializes String objects.
    • Constructor Detail

      • StringSerializer

        public StringSerializer()
    • Method Detail

      • matchedToByArray

        protected byte[] matchedToByArray​(String o)
      • matchedFromByteArray

        protected String matchedFromByteArray​(byte[] bytes,
                                              Class<String> type)
      • fromByteArray

        public <T> T fromByteArray​(byte[] bytes,
                                   Class<T> type)
                            throws IOException
        Description copied from interface: Serializer
        Produces an object of type T from an array of bytes.
        Specified by:
        fromByteArray in interface Serializer
        Throws:
        IOException - if serialization to byte array fails