]> granicus.if.org Git - postgresql/commit
The current implementation of BlobInputStream does
authorBruce Momjian <bruce@momjian.us>
Wed, 16 May 2001 03:29:01 +0000 (03:29 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 16 May 2001 03:29:01 +0000 (03:29 +0000)
commite046e1dfab4f62e24f1abbff7757b0d89620f225
tree1e447636f1406339b01e1e86dd3ddab7b33d58dd
parentdbb219b896fd0c0b4a00e4a0421f7b8b382fd968
The current implementation of BlobInputStream does
not properly handle 8-bit unsigned data as it blindly
casts the byte to an int, which java most helpfully
promotes to a signed type.  This causes problems when
you can only return -1 to indicated EOF.

The following patch fixes the bug and has been tested
locally on image data.

Chad David
src/interfaces/jdbc/org/postgresql/largeobject/BlobInputStream.java