Package com.android.dex.util
Class FileUtils
java.lang.Object
com.android.dex.util.FileUtils
File I/O utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
hasArchiveSuffix
(String fileName) Returns true iffileName
names a .zip, .jar, or .apk.static byte[]
Reads the given file, translatingIOException
to aRuntimeException
of some sort.static byte[]
Reads the named file, translatingIOException
to aRuntimeException
of some sort.
-
Method Details
-
readFile
Reads the named file, translatingIOException
to aRuntimeException
of some sort.- Parameters:
fileName
-non-null;
name of the file to read- Returns:
non-null;
contents of the file
-
readFile
Reads the given file, translatingIOException
to aRuntimeException
of some sort.- Parameters:
file
-non-null;
the file to read- Returns:
non-null;
contents of the file
-
hasArchiveSuffix
Returns true iffileName
names a .zip, .jar, or .apk.
-