Source/CSBackend/Platform/Android/Main/Java/com/chilliworks/chillisource/core/FileUtils.java
/**
	 * Reads the entire contents of a binary file in the given 
	 * storage location. The contents are read as a byte array.
	 * 
	 * @author Ian Copland
	 * 
	 * @param The storage location. If APK, the CSApplication and CSActivity
	 * must exist.
	 * @param The filename.
	 * 
	 * @return The byte array.
	 */
Reads the entire contents of a binary file in the given
storage location. The contents are read as a byte array.

@author Ian Copland

@param The storage location. If APK, the CSApplication and CSActivity
must exist.
@param The filename.

@return The byte array.
Reads the entire contents of a binary file in the given storage location . The contents are read as a byte array . @author Ian Copland @param The storage location . If APK the CSApplication and CSActivity must exist . @param The filename . @return The byte array .
public static byte[] readFile(StorageLocation in_storageLocation, String in_filePath)
	{
		switch (in_storageLocation)
		{
			case k_root:
				return readFile(in_filePath);
			case k_externalStorage:
				return readFile(StringUtils.StandardisePath(getExternalStorageDirectory()) + in_filePath);
			case k_internalStorage:
				return readFileInternal(in_filePath);
			case k_apk:
				return readFileAPK(CSApplication.get().getActivity(), in_filePath);
			default:
				Logging.logFatal("FileUtils: Invalid storage location.");
				return null;
		}
	}
public static byte [ ] readFile ( StorageLocation in_storageLocation , String in_filePath ) { switch ( in_storageLocation ) { case k_root : return readFile ( in_filePath ) ; case k_externalStorage : return readFile ( StringUtils . StandardisePath ( getExternalStorageDirectory ( ) ) + in_filePath ) ; case k_internalStorage : return readFileInternal ( in_filePath ) ; case k_apk : return readFileAPK ( CSApplication . get ( ) . getActivity ( ) , in_filePath ) ; default : Logging . logFatal ( "FileUtils: Invalid storage location." ) ; return null ; } }
Reads the entire contents of a binary file in the given
 storage location.
Reads the entire contents of a binary file in the given storage location .