public void setBlobValue(int iindex, byte[] value, PreparedStatement pstmt) throws SQLException { if (value == null) { pstmt.setBinaryStream(iindex, null, 0); } else { try { ByteArrayInputStream in = Tools.getInputStreamFromBytesArray(value); pstmt.setBinaryStream(iindex, in, in.available()); in.close(); } catch (IOException e) { throw new WabacusRuntimeException("将字节流写入数据库失败", e); } } }