public final class FileHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FileHelper.FileWithParametersBuilder
Class to help substitute parameters in a file.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
fromFile(String fileName)
Reads in a resource from the class path, using UTF-8 encoding.
|
static String |
fromFile(String fileName,
String encoding)
Reads in a resource from the class path.
|
static FileHelper.FileWithParametersBuilder |
fromFileWithParameters(String filename)
Reads in a resource from the class path and allow parameters in the
file to substituted with other strings.
|
static FileHelper.FileWithParametersBuilder |
fromFileWithParameters(String filename,
String encoding)
Reads in a resource from the class path and allow parameters in the
file to substituted with other strings.
|
public static String fromFile(String fileName, String encoding)
fileName - The file name to loadencoding - The encoding to use when reading the filepublic static String fromFile(String fileName)
fileName - The file name to loadpublic static FileHelper.FileWithParametersBuilder fromFileWithParameters(String filename)
filename - The name of the file to loadpublic static FileHelper.FileWithParametersBuilder fromFileWithParameters(String filename, String encoding)
filename - The name of the file to loadencoding - The encoding to use when reading the file.Copyright © 2013. All Rights Reserved.