Code-set conversion for BLOB and BYTE data types
When you use java.sql.PreparedStatement::setCharacterStream() to insert in a CLOB column, Java™ Unicode characters are converted automatically to the database locale code set. If the environment variable IFX_CODESETLOB is set, its value determine whether to perform code set conversion using temporary files or to perform the code set conversion in memory. If IFX_CODESETLOB is not set, the LOBCACHE environment variable determines whether the code set conversion takes place in temporary files or in memory.
However, you are discouraged from using java.sql.PreparedStatement::setCharacterStream() to insert BLOB or BYTE columns. The JDBC driver cannot insert Java™ characters in a database and consequently attempts code set conversion of the characters. Using java.sql.PreparedStatement::setBinaryStream() is the preferred way to insert BLOB or BYTE columns.