如何打开assets.json ios
展开全部
AssetManager assetManager = context.getAssets();
try {
InputStream is = assetManager.open("json.data");
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuffer stringBuffer = new StringBuffer();
String str = null;
while((str = br.readLine())!=null){
stringBuffer.append(str);
}
} catch (IOException e) {
e.printStackTrace();
}
v
try {
InputStream is = assetManager.open("json.data");
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuffer stringBuffer = new StringBuffer();
String str = null;
while((str = br.readLine())!=null){
stringBuffer.append(str);
}
} catch (IOException e) {
e.printStackTrace();
}
v
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询