Interface SerializableStreamContentHandler

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
DirectWriteContentHandler, TempBufferContentHandler

public interface SerializableStreamContentHandler extends Closeable
Interface for content handlers used by SerializableStream.
  • Method Details

    • write

      long write(SaRMIServerCommand command, int token, String filename, byte[] buffer, boolean isLast, int element, boolean doStreaming) throws IOException
      Writes the content.
      Parameters:
      command - server command used for writing
      token - current user token
      filename - name of the file that is written
      buffer - data to write
      isLast - whether the buffer is the last one to write
      element - content element that is written
      doStreaming - enable or disable streaming to the archive
      Returns:
      the number that was assigned to the written element
      Throws:
      IOException - IO exception when writing
    • persisted

      boolean persisted()
      Returns:
      true if the content written to this content handler was persisted.
    • getInputStream

      InputStream getInputStream() throws IOException
      Returns:
      Input stream for content that was not yet persisted.
      Throws:
      IOException - IO exception when opening stream