public final class FileUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getRandomFilename(String prefix)
Constructs a random filename with the given prefix and
a random part generated from hex characters.
|
static String |
readFile(File file,
String charsetName) |
static String |
readFileUtf8(File file) |
static void |
writeFile(File file,
String contents,
String encoding) |
static void |
writeFileUtf8(File file,
String contents) |
public static String getRandomFilename(String prefix)
prefix
- the prefix to the filename to be constructedpublic static String readFile(File file, String charsetName) throws IOException
IOException
public static String readFileUtf8(File file) throws IOException
IOException
public static void writeFile(File file, String contents, String encoding) throws IOException
IOException
public static void writeFileUtf8(File file, String contents) throws IOException
IOException
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.