Interface ToFileWriter<T>

    • Method Detail

      • mkdirs

        static void mkdirs​(java.io.File dir)
        Make sure this directory exists, create if necessary
      • newBuilder

        static ToFileWriter.Builder<java.nio.file.Path> newBuilder​(java.nio.file.Path file)
      • output

        static java.io.OutputStream output​(java.io.File file)
      • serializeObjectToFile

        static <T extends java.io.Serializable> void serializeObjectToFile​(T object,
                                                                           java.io.File file)
      • close

        default 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
      • write

        void write​(T item)
        Write the item to the consumer.
        Parameters:
        item - The item to be written
      • writeBatch

        default void writeBatch​(java.lang.Iterable<? extends T> batch)
        Write the batch (collection of items) to the consumer.
        Parameters:
        batch - The batch to be written