public final class Utils extends Object
| Modifier and Type | Method and Description | 
|---|---|
static String | 
normalizeEndOfLine(String content)
normalize EOLs to simple line feed (\\n). 
 | 
static String | 
readFile(File file)
Deprecated. 
 
this API isn't explicit about encoding nor EOL normalization, use readPlatformFile() or
 readXmlFile() depending on your need, in conjunction with normalizeEndOfLine() 
 | 
static String | 
readPlatformFile(File file)  | 
static String | 
readXmlFile(File file)  | 
static String | 
toString(Throwable error)  | 
static void | 
writeFileWithEncoding(File file,
                     String content,
                     String encoding)  | 
static void | 
writePlatformFile(File file,
                 String content)  | 
static void | 
writeToFile(File file,
           String testStr)
Deprecated. 
 
this API isn't explicit about encoding, use writePlatformFile() or writeXmlFile()
 depending on your need 
 | 
static void | 
writeXmlFile(File file,
            String content)  | 
public static void writePlatformFile(File file, String content) throws IOException
IOExceptionpublic static void writeFileWithEncoding(File file, String content, String encoding) throws IOException
IOExceptionpublic static void writeXmlFile(File file, String content) throws IOException
IOExceptionpublic static void writeToFile(File file, String testStr) throws IOException
IOExceptionpublic static String readFile(File file) throws IOException
IOExceptionpublic static String readPlatformFile(File file) throws IOException
IOExceptionpublic static String readXmlFile(File file) throws IOException
IOExceptionpublic static String normalizeEndOfLine(String content)
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.