Class FileIOUtils.BurnOnCloseFileIterator<T>

  • Type Parameters:
    T - the type of elements in the iterator
    All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.util.Iterator<T>
    Enclosing class:
    FileIOUtils

    @Deprecated
    public static class FileIOUtils.BurnOnCloseFileIterator<T>
    extends AbstractIterator<T>
    implements java.io.Closeable
    Deprecated.
    Implements a Closeable wrapper over a LineIterator. Also has a transformer to transform the output. If the underlying file is provide then it deletes the file on close(). If there is a scope for lines in the file containing line break characters it should be ensured that the files is written with FileIOUtils.writeAsLine(BufferedWriter, String, boolean) with true to escape line break characters and should be properly unescaped on read. A custom transformer can also be provided to unescape.
    • Constructor Detail

      • BurnOnCloseFileIterator

        public BurnOnCloseFileIterator​(LineIterator iterator,
                                       Function<java.lang.String,​T> transformer)
        Deprecated.
      • BurnOnCloseFileIterator

        public BurnOnCloseFileIterator​(LineIterator iterator,
                                       java.io.File backingFile,
                                       Function<java.lang.String,​T> transformer)
        Deprecated.