Class RandomAccessFileOutputStream.Builder

    • Method Detail

      • get

        public RandomAccessFileOutputStream get()
                                         throws java.io.IOException
        Builds a new RandomAccessFileOutputStream.

        You must set an aspect that supports RandomAccessFile or File, otherwise, this method throws an exception. Only set one of RandomAccessFile or an origin that can be converted to a File.

        This builder uses the following aspects:

        • RandomAccessFile is the target aspect.
        • File
        • closeOnClose
        Returns:
        a new instance.
        Throws:
        java.lang.IllegalStateException - if the origin is null.
        java.lang.IllegalStateException - if both RandomAccessFile and origin are set.
        java.lang.UnsupportedOperationException - if the origin cannot be converted to a RandomAccessFile.
        java.io.IOException - if an I/O error occurs converting to an RandomAccessFile using AbstractStreamBuilder.getRandomAccessFile().
        See Also:
        AbstractOrigin.getFile(), IOSupplier.getUnchecked()