If a stream is re-read, it returns a -1 which is incorrect data.
Federated system users: a data source-specific literal representation error has occurred in apass-through session. Examine the SQL dialect for that data source to determine which literal representation rule has been violated, and adjust the failing statement as needed.For binary data, the stream data is prepended with 4 zeroes.Problem: once,the stream has been read fully and end of file reached, further read() returns a -1.I have table contained BLOB and CLOB fields: Create table string is: private static final String CREATE = "CREATE TABLE ta (" "ta_id INTEGER NOT NULL," "mname VARCHAR( 254 ) NOT NULL," "mvalue INT NOT NULL," "mdate DATE NOT NULL," "bytedata BLOB NOT NULL," "chardata CLOB NOT NULL," "PRIMARY KEY ( ta_id ))"; Then I insert 2000 rows in the table. "; /*create blob and clob arrays*/ int len1 = 10000;//for blob length data int len2 = 15000;//for clob length data byte buf  = new byte Background : In Derby, when a stream is set as a parameter value, the wrapper stream object used for character data is Reader To UTF8Stream and for binary data it is Raw To Binary Format Stream.Then I update all 2000 rows by command: private static final String UPDATE = "UPDATE ta " "SET bytedata=? Both these stream objects on read() return data in a format that is used to store the respective datatype value.