Top Description Constructors Methods
org.droidparts.dexmaker.dx.util

public final Class FileUtils

extends Object
Class Inheritance
Imports
java.io.File, .FileInputStream, .IOException

File I/O utilities.

Constructor Summary

AccessConstructor and Description
private
FileUtils()

This class is uninstantiable.

Method Summary

Modifier and TypeMethod and Description
public static boolean
hasArchiveSuffix(String fileName)

Returns true if fileName names a .zip, .jar, or .apk.

public static byte[]

Returns:

non-null; contents of the file
readFile
(String
non-null; name of the file to read
fileName
)

Reads the named file, translating IOException to a RuntimeException of some sort.

public static byte[]

Returns:

non-null; contents of the file
readFile
(File
non-null; the file to read
file
)

Reads the given file, translating IOException to a RuntimeException of some sort.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FileUtilsback to summary
private FileUtils()

This class is uninstantiable.

Method Detail

hasArchiveSuffixback to summary
public static boolean hasArchiveSuffix(String fileName)

Returns true if fileName names a .zip, .jar, or .apk.

readFileback to summary
public static byte[] readFile(String fileName)

Reads the named file, translating IOException to a RuntimeException of some sort.

Parameters
fileName:String

non-null; name of the file to read

Returns:byte[]

non-null; contents of the file

readFileback to summary
public static byte[] readFile(File file)

Reads the given file, translating IOException to a RuntimeException of some sort.

Parameters
file:File

non-null; the file to read

Returns:byte[]

non-null; contents of the file