public void setBlob(final int parameterIndex, final Blob blob) throws SQLException {
    if (blob == null) {
      setNull(parameterIndex, Types.BLOB);
      return;
    }
    setParameter(parameterIndex,
        new StreamParameter(blob.getBinaryStream(), blob.length(), noBackslashEscapes));
    hasLongData = true;
  }
public void setBlob ( final int parameterIndex , final Blob blob ) throws SQLException { if ( blob == null ) { setNull ( parameterIndex , Types . BLOB ) ; return ; } setParameter ( parameterIndex , new StreamParameter ( blob . getBinaryStream ( ) , blob . length ( ) , noBackslashEscapes ) ) ; hasLongData = true ; }
Sets the designated parameter to the given <code>java.sql.Blob</code> object. The driver
converts this to an SQL
<code>BLOB</code> value when it sends it to the database.

@param parameterIndex the first parameter is 1, the second is 2, ...
@param blob           a <code>Blob</code> object that maps an SQL <code>BLOB</code> value
@throws SQLException                    if parameterIndex does not correspond to a parameter
marker in the SQL statement; if a database access error
occurs or this method is called on a closed
<code>PreparedStatement</code>