当前位置:编程学习 > wap >>

android项目访问E盘上的图片

BufferedInputStream in=new 
BufferedInputStream(new 
FileInputStream("E:/graduate/images/icon.jpg"));
ByteArrayOutputStream out=new ByteArrayOutputStream(1024);
Log.i("wwwwwwwwww", "Avaiable bytes "+in.available());
byte[] temp=new byte[1024];
int size=0;
while((size=in.read(temp))!=-1)
out.write(temp, 0, size);
in.close();
byte[] content=out.toByteArray();
return content;



总是出错:
java.io.FileNotFoundException: /E:/graduate/images/icon.jpg: open failed: ENOENT (No such file or directory)



求大神帮忙,这是为什么? --------------------编程问答-------------------- 用手机只能访问手机上的资源,咋能访问你电脑上的文件呢。。 --------------------编程问答--------------------
引用 1 楼 leehu1987 的回复:
用手机只能访问手机上的资源,咋能访问你电脑上的文件呢。。


+1
--------------------编程问答-------------------- E盘是你的开发板外接设备吗?
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,