Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addLines(String uriString,
Set<String> set) |
static List<ClassLoader> |
getClassLoaders()
Returns default classloaders.
|
static InputStream |
getStreamForClasspathFile(String path,
ClassLoader loader) |
static InputStream |
getStreamForUri(URI uri,
ClassLoader loader) |
static String |
readFile(File file) |
static String |
readFileOrThrow(File file)
Reads the contents of a File.
|
static boolean |
writeFile(File file,
CharSequence content) |
static void |
writeFileOrThrow(File file,
CharSequence content) |
public FileUtils()
public static InputStream getStreamForClasspathFile(String path, ClassLoader loader) throws IOException
IOException
public static InputStream getStreamForUri(URI uri, ClassLoader loader) throws IOException
IOException
public static List<ClassLoader> getClassLoaders()
public static boolean addLines(String uriString, Set<String> set) throws MalformedURLException, IOException
MalformedURLException
IOException
public static String readFileOrThrow(File file) throws IOException
file
- IOException
public static void writeFileOrThrow(File file, CharSequence content) throws IOException
IOException
public static boolean writeFile(File file, CharSequence content)