????Java ???????????г??洢????????????????????洢????????£???Щ????????????????????????????????????????????????洢??????????????????????????????????????????????????????£?????????????洢??????????
????java????洢??Blob

 

ByteArrayOutputStream bo = new ByteArrayOutputStream();
ObjectOutputStream oo;
try {
oo = new ObjectOutputStream(bo);
oo.writeObject(libraryEtextJn);
} catch (IOException e) {
e.printStackTrace();
}
Blob blob=  Hibernate.createBlob(bo.toByteArray());

??????Blob???Java????
????ObjectInputStream is = new ObjectInputStream(new BufferedInputStream(blob.getBinaryStream()));
????LibraryEtext libraryEtext = (LibraryEtext)is.readObject();
????Hibernate????Blob???
????<property name="liberary" column="LIBERARY" type="blob" />