摘要:
持久类定义字段:private Blob diff;设置要保存的对象:public Blob getBlob(Object o) {ByteArrayOutputStream outs = new ByteArrayOutputStream();try {ObjectOutputStream oos = new ObjectOutputStream(outs);oos.writeObject(o);} catch (IOException e) {throw new RuntimeException(e);}return (Hibernate.createBlob(outs.toByteArr 阅读全文
posted @ 2012-07-29 11:18 my_house_station 阅读(1652) 评论(0) 推荐(0) 编辑