T
- the type of elements in the iteratorBurnOnCloseFileIterator
instead@Deprecated
public static class FileIOUtils.BurnOnCloseFileIterator<T>
extends com.google.common.collect.AbstractIterator<T>
implements java.io.Closeable
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 and Description |
---|
BurnOnCloseFileIterator(LineIterator iterator,
java.io.File backingFile,
com.google.common.base.Function<java.lang.String,T> transformer)
Deprecated.
|
BurnOnCloseFileIterator(LineIterator iterator,
com.google.common.base.Function<java.lang.String,T> transformer)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
|
static FileIOUtils.BurnOnCloseFileIterator<java.lang.String> |
wrap(LineIterator iter)
Deprecated.
|
static FileIOUtils.BurnOnCloseFileIterator<java.lang.String> |
wrap(LineIterator iter,
java.io.File backingFile)
Deprecated.
|
public BurnOnCloseFileIterator(LineIterator iterator, com.google.common.base.Function<java.lang.String,T> transformer)
public BurnOnCloseFileIterator(LineIterator iterator, java.io.File backingFile, com.google.common.base.Function<java.lang.String,T> transformer)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public static FileIOUtils.BurnOnCloseFileIterator<java.lang.String> wrap(LineIterator iter)
public static FileIOUtils.BurnOnCloseFileIterator<java.lang.String> wrap(LineIterator iter, java.io.File backingFile)
Copyright © 2010 - 2020 Adobe. All Rights Reserved