Class ObjectSerializer


  • public final class ObjectSerializer
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends java.io.Serializable>
      T
      fromByteArray​(byte[] byteBuffer, java.lang.Class<T> clazz)  
      static <T extends java.io.Serializable>
      T
      fromByteArrayUnsafe​(byte[] byteBuffer)  
      static <T extends java.io.Serializable>
      byte[]
      toByteArray​(T obj)  
      • Methods inherited from class java.lang.Object

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

      • toByteArray

        public static <T extends java.io.Serializable> byte[] toByteArray​(T obj)
                                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • fromByteArray

        public static <T extends java.io.Serializable> T fromByteArray​(byte[] byteBuffer,
                                                                       java.lang.Class<T> clazz)
                                                                throws java.io.IOException,
                                                                       java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • fromByteArrayUnsafe

        public static <T extends java.io.Serializable> T fromByteArrayUnsafe​(byte[] byteBuffer)
                                                                      throws java.io.IOException,
                                                                             java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException