Interface Serializers.ObjectSerializer<T>

  • Enclosing class:
    Serializers

    public static interface Serializers.ObjectSerializer<T>
    Generic serializer interface for objects.
    Author:
    Evren Sirin
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T deserialize​(byte[] bytes)
      Deserializes an object from the given byte array using all the bytes in the array starting from the beginning.
      T deserialize​(byte[] bytes, int offset, int length)
      Deserializes an object from the given byte array using the specified number of bytes starting from the given offset.
      byte[] serialize​(T value)
      Serializes the given object to a newly allocated byte array.
      int serialize​(T value, byte[] bytes, int offset)
      Serializes the given object to the given byte array starting at the given offset and returns the number of bytes written.
    • Method Detail

      • serialize

        byte[] serialize​(T value)
        Serializes the given object to a newly allocated byte array.
      • serialize

        int serialize​(T value,
                      byte[] bytes,
                      int offset)
        Serializes the given object to the given byte array starting at the given offset and returns the number of bytes written.
      • deserialize

        T deserialize​(byte[] bytes)
        Deserializes an object from the given byte array using all the bytes in the array starting from the beginning.
      • deserialize

        T deserialize​(byte[] bytes,
                      int offset,
                      int length)
        Deserializes an object from the given byte array using the specified number of bytes starting from the given offset.