标签:
try { InputStream in = getAssets().open("testAsset.txt"); byte[] buffer = new byte[1024]; int len = 0; ByteArrayOutputStream baos = new ByteArrayOutputStream(); while ((len = in.read(buffer)) > 0) { baos.write(buffer, 0, len); } String str = new String(baos.toByteArray(), "GBK"); ZrLog.log(str); in.close(); } catch (IOException e) { e.printStackTrace(); }
标签:
原文地址:http://www.cnblogs.com/AndyHoo/p/5474632.html