Interface ItemSerializer<T>

Type Parameters:
T - type of data contained in the item
All Known Implementing Classes:
DOMElementSerializer

public interface ItemSerializer<T>
Item serializers convert an Item into an octet stream.

The caller is responsible for managing (opening, closing, etc.) the output stream and orchestrating the serialization of collections of Items.

All implementations of this interface must be thread-safe.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    serialize(Item<T> item, OutputStream output)
    Serializes the Item to the given output stream.
  • Method Details

    • serialize

      void serialize(@Nonnull Item<T> item, @Nonnull OutputStream output) throws IOException
      Serializes the Item to the given output stream.
      Parameters:
      item - Item to be serialized
      output - output stream to which the serialized Item will be written
      Throws:
      IOException - if an I/O exception occurs during serialization