Interface ItemCollectionSerializer<T>

Type Parameters:
T - type of data contained in each item
All Known Implementing Classes:
DiscoFeedCollectionSerializer, DOMElementSerializer, SimpleItemCollectionSerializer

public interface ItemCollectionSerializer<T>
Item collection serializers convert a Collection of Items into an octet stream.

The caller is responsible for managing (opening, closing, etc.) the output stream.

All implementations of this interface must be thread-safe.

Since:
0.9.0
  • Method Details

    • serializeCollection

      void serializeCollection(@Nonnull @NonnullElements Collection<Item<T>> items, @Nonnull OutputStream output) throws IOException
      Serializes the collection of Items to the given output stream.
      Parameters:
      items - Collection of Items to be serialized
      output - output stream to which the serialized form of the Item collection will be written
      Throws:
      IOException - if an I/O exception occurs during serialization