I am running these lines of code in a Java program
FileInputStream in = new FileInputStream(file);
InputStreamReader reader = new InputStreamReader(in);
int fileLength = (int)file.length();
pstmt1.setCharacterStream(6, reader, fileLength);
But I got the following Exception in some file(s) but not in all file(s)
Exception: Encountered an IOException reading InputStream, parameter #6. Remaining data has been padded with 0x0. See attached Throwable for details. ERRORCODE=-4225, SQLSTATE=null
Where as I am using DB2 Database and the structure of my table is-
CREATE TABLE SOURCE (
LIB VARCHAR(10) NOT NULL,
FILE VARCHAR(10) NOT NULL,
MBR VARCHAR(10) NOT NULL,
ATTR VARCHAR(10) NOT NULL,
SEQ DOUBLE NOT NULL,
DTA CLOB(5M),
DAT INTEGER,
RECN INTEGER,
UNIQUE (LIB, FILE, MBR, ATTR, SEQ)
);
Please help me to recover this Exception.
Thanks in advance!
PreparedStatement.See attached Throwable for details- can we have a look at that?