Class FileLineDifferenceIterator
- java.lang.Object
-
- org.apache.jackrabbit.oak.commons.io.FileLineDifferenceIterator
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterator<String>
public class FileLineDifferenceIterator extends Object implements Closeable, Iterator<String>
FileLineDifferenceIterator class which iterates over the difference of 2 files line by line. If there is a scope for lines in the files containing line break characters it should be ensured that both the files are written withFileIOUtils.writeAsLine(BufferedWriter, String, boolean)
with true to escape line break characters.
-
-
Constructor Summary
Constructors Constructor Description FileLineDifferenceIterator(File marked, File available, @Nullable Function<String,String> transformer)
FileLineDifferenceIterator(LineIterator marked, LineIterator available)
FileLineDifferenceIterator(LineIterator marked, LineIterator available, @Nullable Function<String,String> transformer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
hasNext()
String
next()
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
FileLineDifferenceIterator
public FileLineDifferenceIterator(LineIterator marked, LineIterator available, @Nullable @Nullable Function<String,String> transformer) throws IOException
- Throws:
IOException
-
FileLineDifferenceIterator
public FileLineDifferenceIterator(File marked, File available, @Nullable @Nullable Function<String,String> transformer) throws IOException
- Throws:
IOException
-
FileLineDifferenceIterator
public FileLineDifferenceIterator(LineIterator marked, LineIterator available) throws IOException
- Throws:
IOException
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-