爱玺玺

爱玺玺的生活日记本。wx:lb87626

再理解Java的PrintWriter对象

    //读取到sd卡xml并获得字节流

File path = new File(Environment.getExternalStorageDirectory(),"backupsms.xml");

//FileInputStream fis = new FileInputStream(path);

InputStream in=new FileInputStream(path);

byte[] buf=new byte[1024];//创建字节数组存放读取到的数据


int len=in.read(buf);


System.out.println(new String(buf,0,len));


发表评论:

Powered By Z-BlogPHP 1.4 Deeplue Build 150101

Copyright Your WebSite.Some Rights Reserved.

蜀ICP备11021721号-5