1. btye[]转blob
byte[] bs = ...
Blob blob = conn.createBlob();
blob.setBytes(1, bs); ps.setBlob(2, blob);
2. blob转byte[]
Blob b = resultSet.getBlob(metaData.getColumnLabel(2));
byte[] bytes = b.getBytes(1, (int)b.length());
2022-10-25 11:33:03
1. btye[]转blob
byte[] bs = ...
Blob blob = conn.createBlob();
blob.setBytes(1, bs); ps.setBlob(2, blob);
2. blob转byte[]
Blob b = resultSet.getBlob(metaData.getColumnLabel(2));
byte[] bytes = b.getBytes(1, (int)b.length());
下一篇:对C语言中递归算法的分析