Class TempBufferContentHandler

    • Constructor Detail

      • TempBufferContentHandler

        public TempBufferContentHandler()
        Default constructor that reads the following settings from saperion.properties.
        • operations.binary.tempdir = the directory to store the temporary files
        • operations.binary.inmemorybytes = number of bytes to keep in memory
    • Method Detail

      • write

        public long write​(SaRMIServerCommand command,
                          int token,
                          java.lang.String filename,
                          byte[] buffer,
                          boolean isLast,
                          int element,
                          boolean doStreaming)
                   throws java.io.IOException
        Description copied from interface: SerializableStreamContentHandler
        Writes the content.
        Specified by:
        write in interface SerializableStreamContentHandler
        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:
        java.io.IOException - IO exception when writing
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Specified by:
        getInputStream in interface SerializableStreamContentHandler
        Returns:
        Input stream for content that was not yet persisted.
        Throws:
        java.io.IOException - IO exception when opening stream
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException