Interface Serializers.ObjectSerializer<T>

Enclosing class:
Serializers

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

    Modifier and Type
    Method
    Description
    deserialize(byte[] bytes)
    Deserializes an object from the given byte array using all the bytes in the array starting from the beginning.
    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 Details

    • 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.