com.android.dex.util
Class FileUtils

java.lang.Object
  extended by com.android.dex.util.FileUtils

public final class FileUtils
extends Object

File I/O utilities.


Method Summary
static boolean hasArchiveSuffix(String fileName)
          Returns true if fileName names a .zip, .jar, or .apk.
static byte[] readFile(File file)
          Reads the given file, translating IOException to a RuntimeException of some sort.
static byte[] readFile(String fileName)
          Reads the named file, translating IOException to a RuntimeException of some sort.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

readFile

public static byte[] readFile(String fileName)
Reads the named file, translating IOException to a RuntimeException of 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, translating IOException to a RuntimeException of 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 if fileName names a .zip, .jar, or .apk.



Copyright © 2015. All rights reserved.