标签:blog 使用 os io 文件 ar cti div
public static String readInStream(FileInputStream inStream){ try { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int length = -1; while((length = inStream.read(buffer)) != -1 ){ outStream.write(buffer, 0, length); } outStream.close(); inStream.close(); return outStream.toString();//byte[] data=outStream.toByteArray();
//String result=new String(data);
} catch (IOException e) { Log.i("FileTest", e.getMessage()); } return null; }
标签:blog 使用 os io 文件 ar cti div
原文地址:http://www.cnblogs.com/wdc224/p/3919399.html