62,615
社区成员
发帖
与我相关
我的任务
分享
public Object getObject(byte[] b) {
Object o=null;
try {
ByteArrayInputStream bais = new ByteArrayInputStream(b);
ObjectInputStream ois;
ois = new ObjectInputStream(bais);
o =ois.readObject();
// ArrayList str = (ArrayList) ois.readObject(); //读取类
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return o;
}
能帮你把字节转化成一个File对象
剩下的就容易了吧。
但不知道为啥,我总感觉这种得到的图片和原图不一样,