public class FileUtils extends Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copyFile(File src,
File dest)
Copy a file.
|
static byte[] |
getBytesFromClassesRoot(String fileName) |
static File |
getFileFromClassesRoot(String fileName)
Retrieve a file from the root of the classes directory.
|
static File |
getFileFromClassesRoot(String fileName,
Class relativeTo)
Retrieve a file from the root of the classes directory.
|
static InputStream |
getStreamFromClassesRoot(String fileName) |
static InputStream |
getStreamFromClassesRoot(String fileName,
Class relativeTo) |
static String |
getStringFromClassesRoot(String fileName) |
static boolean |
isSame(byte[] contents,
File toCheck) |
static byte[] |
readBytesFromFile(File f) |
static byte[] |
readBytesFromStream(InputStream in) |
static String |
readFileToString(File fInput) |
static void |
writeBytesToFile(byte[] data,
File fOutput) |
static void |
writeStringToFile(String strData,
File fOutput) |
public static void writeBytesToFile(byte[] data, File fOutput) throws IOException
IOException
public static File getFileFromClassesRoot(String fileName) throws FileNotFoundException
FileNotFoundException
public static File getFileFromClassesRoot(String fileName, Class relativeTo) throws FileNotFoundException
FileNotFoundException
public static InputStream getStreamFromClassesRoot(String fileName) throws FileNotFoundException
FileNotFoundException
public static InputStream getStreamFromClassesRoot(String fileName, Class relativeTo) throws FileNotFoundException
FileNotFoundException
public static byte[] getBytesFromClassesRoot(String fileName) throws IOException
IOException
public static String getStringFromClassesRoot(String fileName) throws IOException
IOException
public static byte[] readBytesFromStream(InputStream in) throws IOException
IOException
public static byte[] readBytesFromFile(File f) throws IOException
IOException
public static void writeStringToFile(String strData, File fOutput) throws IOException
IOException
public static String readFileToString(File fInput) throws IOException
IOException
public static boolean isSame(byte[] contents, File toCheck) throws IOException
IOException
public static void copyFile(File src, File dest) throws IOException
IOException
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"