Details
Description
Take the following code to copy a sub-stream from a BLOB:
Blob blob = rs.getBlob(1);
InputStream stream = blob.getBinaryStream(1000, 2000);
try {
IOUtils.copy(stream, out);
} finally {
stream.close();
}
This will loop forever in IOUtils.copy, as the InputStream is returning 0 at end of stream instead of -1. It probably should return -1 to comply with the Javadoc for InputStream.
Notes:
I have not yet checked Blob.getBinaryStream(), or any of the Clob methods, or the client driver. So some of these may have a similar issue.