在您的
ResultSet通话中:
Blob imageBlob = resultSet.getBlob(yourBlobColumnIndex);InputStream binaryStream = imageBlob.getBinaryStream(0, imageBlob.length());
或者,您可以致电:
byte[] imageBytes = imageBlob.getBytes(1, (int) imageBlob.length());
正如BalusC在评论中指出的那样,您最好使用:
InputStream binaryStream = resultSet.getBinaryStream(yourBlobColumnIndex);
然后代码取决于您如何读取和嵌入图像。



