Interface Write


  • public interface Write
    A write interface provided by the underlying store to write to it
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int appendFrom​(java.nio.ByteBuffer buffer)
      Appends the buffer into the underlying write interface (eg: file).
      void appendFrom​(java.nio.channels.ReadableByteChannel channel, long size)
      Appends the channel to the underlying write interface.
    • Method Detail

      • appendFrom

        int appendFrom​(java.nio.ByteBuffer buffer)
                throws StoreException
        Appends the buffer into the underlying write interface (eg: file). Returns the number of bytes successfully written
        Parameters:
        buffer - The buffer from which data needs to be written from
        Returns:
        The number of bytes written to the write interface
        Throws:
        StoreException - if store error occurs when writing into underlying interface
      • appendFrom

        void appendFrom​(java.nio.channels.ReadableByteChannel channel,
                        long size)
                 throws StoreException
        Appends the channel to the underlying write interface. Writes "size" number of bytes to the interface.
        Parameters:
        channel - The channel from which data needs to be written from
        size - The amount of data in bytes to be written from the channel
        Throws:
        StoreException - if store error occurs when writing into underlying interface