Interface MultiOutputSerializationStage.Destination

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
FilesInDirectoryMultiOutputStrategy.FileDestination
Enclosing class:
MultiOutputSerializationStage<T>

public static interface MultiOutputSerializationStage.Destination extends Closeable
Interface implemented by destination objects created by an MultiOutputSerializationStage.OutputStrategy. The MultiOutputSerializationStage.Destination must be closed after the associated OutputStream. This extra level of processing allows the MultiOutputSerializationStage.Destination to perform other tasks after the stream is closed without having to subclass or proxy the stream class.
  • Method Details

    • getOutputStream

      @Nonnull OutputStream getOutputStream() throws IOException
      Gets an OutputStream to which an item should be serialized.
      Returns:
      output stream to which to serialize the item
      Throws:
      IOException - if there is an error creating the output stream