从资产读取文件
public class Utils { public static List<Message> getMessages() { //File file = new File("file:///android_asset/helloworld.txt"); AssetManager assetManager = getAssets(); InputStream ims = assetManager.open("helloworld.txt"); }}
File
FileNotFoundException
AssetManager getAssets()
相关分类