public final class FileIOUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FileIOUtils.TransformingComparator
Decorates the given comparator and applies the function before delegating to the decorated
comparator.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.Comparator<java.lang.String> |
lineBreakAwareComparator(java.util.Comparator<java.lang.String> delegate)
Composing iterator which unescapes for line breaks and delegates to the given comparator.
|
static java.util.Set<java.lang.String> |
readStringsAsSet(java.io.InputStream stream,
boolean unescape)
Reads strings from the given stream into a set and optionally unescaping for line breaks.
|
static void |
writeAsLine(java.io.BufferedWriter writer,
java.lang.String str,
boolean escape)
Writes a string as a new line into the given buffered writer and optionally
escapes the line for line breaks.
|
static int |
writeStrings(java.util.Iterator<java.lang.String> iterator,
java.io.File f,
boolean escape)
Writes string from the given iterator to the given file and optionally
escape the written strings for line breaks.
|
public static void writeAsLine(java.io.BufferedWriter writer,
java.lang.String str,
boolean escape)
throws java.io.IOException
writer - to write the stringstr - the string to writeescape - whether to escape string for line breaksjava.io.IOExceptionpublic static int writeStrings(java.util.Iterator<java.lang.String> iterator,
java.io.File f,
boolean escape)
throws java.io.IOException
iterator - the source of the stringsf - file to write toescape - whether to escape for line breaksjava.io.IOExceptionpublic static java.util.Set<java.lang.String> readStringsAsSet(java.io.InputStream stream,
boolean unescape)
throws java.io.IOException
stream - the source of the stringsunescape - whether to unescape for line breaksjava.io.IOExceptionpublic static java.util.Comparator<java.lang.String> lineBreakAwareComparator(java.util.Comparator<java.lang.String> delegate)
delegate - the actual comparison iterator"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"