code: public static Object convertClob(Object clob, byte[] value) throws SQLException {
          ByteArrayInputStream input = new ByteArrayInputStream(value);
          //OutputStream output = clob.setAsciiStream(1);
          OutputStream output = null;
          try {
              output = (OutputStream) MappingUtils.invokeFunction(clob, "setAsciiStream", new Class[]{long.class}, new Object[]{1});
          } catch (MjdbcException ex) {
              throw new MjdbcSQLException(ex);
          }
  
          try {
              copy(input, output);
  
              output.flush();
              output.close();
          } catch (IOException ex) {
              throw new MjdbcSQLException(ex);
          }
  
          return clob;
      }
docs: Transfers data from byte[] into sql.Clob
  
  @param clob  sql.Clob which would be filled
  @param value array of bytes
  @return sql.Clob from array of bytes
  @throws SQLException