Package com.android.dex.util
Class FileUtils
- java.lang.Object
-
- com.android.dex.util.FileUtils
-
public final class FileUtils extends Object
File I/O utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanhasArchiveSuffix(String fileName)Returns true iffileNamenames a .zip, .jar, or .apk.static byte[]readFile(File file)Reads the given file, translatingIOExceptionto aRuntimeExceptionof some sort.static byte[]readFile(String fileName)Reads the named file, translatingIOExceptionto aRuntimeExceptionof some sort.
-
-
-
Method Detail
-
readFile
public static byte[] readFile(String fileName)
Reads the named file, translatingIOExceptionto aRuntimeExceptionof some sort.- Parameters:
fileName-non-null;name of the file to read- Returns:
non-null;contents of the file
-
readFile
public static byte[] readFile(File file)
Reads the given file, translatingIOExceptionto aRuntimeExceptionof some sort.- Parameters:
file-non-null;the file to read- Returns:
non-null;contents of the file
-
hasArchiveSuffix
public static boolean hasArchiveSuffix(String fileName)
Returns true iffileNamenames a .zip, .jar, or .apk.
-
-