Interface FileIOChannel

    • Method Detail

      • getChannelID

        FileIOChannel.ID getChannelID()
        Gets the channel ID of this I/O channel.
        Returns:
        The channel ID.
      • getSize

        long getSize()
              throws IOException
        Gets the size (in bytes) of the file underlying the channel.
        Throws:
        IOException
      • isClosed

        boolean isClosed()
        Checks whether the channel has been closed.
        Returns:
        True if the channel has been closed, false otherwise.
      • close

        void close()
            throws IOException
        Closes the channel. For asynchronous implementations, this method waits until all pending requests are handled. Even if an exception interrupts the closing, the underlying FileChannel is closed.
        Throws:
        IOException - Thrown, if an error occurred while waiting for pending requests.
      • deleteChannel

        void deleteChannel()
        Deletes the file underlying this I/O channel.
        Throws:
        IllegalStateException - Thrown, when the channel is still open.
      • closeAndDelete

        void closeAndDelete()
                     throws IOException
        Closes the channel and deletes the underlying file. For asynchronous implementations, this method waits until all pending requests are handled.
        Throws:
        IOException - Thrown, if an error occurred while waiting for pending requests.