if (in == STREAM_NULL_VALUE) { setNull(); return; }
    void setBinaryStream(InputStream in, int length) throws SQLException {        if (!c.getAutoCommit()) {            copyBinaryStream(in, length);        } else {            byte[] buff = new byte[BUFF_SIZE];            ByteArrayOutputStream bout = new ByteArrayOutputStream(length);            int chunk;            try {                while (length >0) {                    chunk =in.read(buff, 0, ((length<BUFF_SIZE) ? length:BUFF_SIZE));                    bout.write(buff, 0, chunk);                    length -= chunk;                }                bout.close();            }            catch (IOException ioe) {                throw new SQLException("read/write blob problem: " + ioe);            }            field.sqldata = bout.toByteArray();            field.sqllen = ((byte[])field.sqldata).length;            isCachedData = true;        }    }