code: public void setBlob(final int parameterIndex, final InputStream inputStream) throws SQLException {
          if(inputStream == null) {
              setNull(parameterIndex, Types.BLOB);
              return;
          }
  
  
          try {
              if(getProtocol().supportsPBMS()) {
                  setParameter(parameterIndex,
                          new BlobStreamingParameter(inputStream, getProtocol().getHost(), "9090", getProtocol().getDatabase()));
              } else {
                  setParameter(parameterIndex, new BufferedStreamParameter(inputStream));
              }
          } catch (IOException e) {
              throw SQLExceptionMapper.getSQLException("Could not read stream");
          }
  
  
      }
docs: Sets the designated parameter to a <code>InputStream</code> object. This method differs from the
  <code>setBinaryStream (int, InputStream)</code> method because it informs the driver that the parameter value
  should be sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used, the
  driver may have to do extra work to determine whether the parameter data should be sent to the server as a
  <code>LONGVARBINARY</code> or a <code>BLOB</code>
  <p/>
  <P><B>Note:</B> Consult your JDBC driver documentation to determine if it might be more efficient to use a
  version of <code>setBlob</code> which takes a length parameter.
  
  @param parameterIndex index of the first parameter is 1, the second is 2, ...
  @param inputStream    An object that contains the data to set the parameter value to.
  @throws java.sql.SQLException if parameterIndex does not correspond to a parameter marker in the SQL statement;
  if a database access error occurs; this method is called on a closed
  <code>PreparedStatement</code> or if parameterIndex does not correspond to a
  parameter marker in the SQL statement,
  @throws java.sql.SQLFeatureNotSupportedException
  if the JDBC driver does not support this method
  @since 1.6