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