I want to write a byte array to a raw column in oracle.
byte[] bArray = new byte[16];
stmt = fConnection.prepareStatement(query);
I want to do something like:
stmt.setBinaryStream(1, bArray );
However, I couldn’t figure out an elegant way of doing it. Can some one please throw in some pointers.
There the
setBytes()method is for.Click the above
setBytes()link for an overview of all methods of thePreparedStatementclass. It’s called javadoc. Start familarizing you with the javadocs. They are invaluable.