What is the easiest way to convert byte array into Blob data type in MYSQL with java programming language?
Blob blob = connection.createBlob();
blob.setBytes(1, bytes);
Sirish
You may try this one, if you are using hibernate.. Possibly the easiest way! :)
Blob blob = Hibernate.createBlob(bytes);
Blob fileBlob = new javax.sql.rowset.serial.SerialBlob(byteArray);
来源:https://stackoverflow.com/questions/6662813/easiest-way-to-convert-byte-array-into-blob-in-java