Interface FileIO.Sink<ElementT>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void flush()
      Flushes the buffered state (if any) before the channel is closed.
      void open​(java.nio.channels.WritableByteChannel channel)
      Initializes writing to the given channel.
      void write​(ElementT element)
      Appends a single element to the file.
    • Method Detail

      • open

        void open​(java.nio.channels.WritableByteChannel channel)
           throws java.io.IOException
        Initializes writing to the given channel. Will be invoked once on a given FileIO.Sink instance.
        Throws:
        java.io.IOException
      • write

        void write​(ElementT element)
            throws java.io.IOException
        Appends a single element to the file. May be invoked zero or more times.
        Throws:
        java.io.IOException
      • flush

        void flush()
            throws java.io.IOException
        Flushes the buffered state (if any) before the channel is closed. Does not need to close the channel. Will be invoked once.
        Throws:
        java.io.IOException