public class ResourceUtils
extends java.lang.Object
构造器和说明 |
---|
ResourceUtils() |
限定符和类型 | 方法和说明 |
---|---|
static java.lang.String |
getFileFromAssets(android.content.Context context,
java.lang.String fileName)
get an asset using ACCESS_STREAMING mode.
|
static java.lang.String |
getFileFromRaw(android.content.Context context,
int resId)
get content from a raw resource.
|
static java.util.List<java.lang.String> |
getFileToListFromAssets(android.content.Context context,
java.lang.String fileName)
same to
getFileFromAssets(android.content.Context, String) , but return type is List |
static java.util.List<java.lang.String> |
getFileToListFromRaw(android.content.Context context,
int resId)
same to
getFileFromRaw(android.content.Context, int) , but return type is List |
public static java.lang.String getFileFromAssets(android.content.Context context, java.lang.String fileName)
context
- fileName
- The name of the asset to open. This name can be hierarchical.public static java.lang.String getFileFromRaw(android.content.Context context, int resId)
context
- resId
- The resource identifier to open, as generated by the appt tool.public static java.util.List<java.lang.String> getFileToListFromAssets(android.content.Context context, java.lang.String fileName)
getFileFromAssets(android.content.Context, String)
, but return type is Listcontext
- fileName
- public static java.util.List<java.lang.String> getFileToListFromRaw(android.content.Context context, int resId)
getFileFromRaw(android.content.Context, int)
, but return type is Listcontext
- resId
-