Type Parameters:
T - type of objects to serialize/deserialize
All Known Implementing Classes:
BlockfileNamingService.DestEntrySerializer, BlockfileNamingService.DestEntrySerializerV4, BlockfileNamingService.PropertiesSerializer, IdentityBytes, IntBytes, StringBytes, UTF8StringBytes

public interface Serializer<T>
Interface for serializing and deserializing objects to/from byte arrays. Provides bidirectional conversion between objects and their byte representation.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    construct(byte[] b)
    b).
    byte[]
    o).
  • Method Details

    • getBytes

      byte[] getBytes(T o)
      o).
      Parameters:
      o - the object to serialize
      Returns:
      the given object's serialized form as a byte array
    • construct

      T construct(byte[] b)
      b).
      Parameters:
      b - the serialized bytes to read back
      Returns:
      the deserialized object