code: @Override
      public long write(final InputStream _in,
                        final long _size,
                        final String _fileName)
          throws EFapsException
      {
          long size = 0;
          ConnectionResource res = null;
          try {
              res = Context.getThreadContext().getConnectionResource();
  
              final AbstractDatabase<?> db = Context.getDbType();
              final StringBuilder cmd = new StringBuilder().append(db.getSQLPart(SQLPart.UPDATE)).append(" ")
                      .append(db.getTableQuote()).append(JDBCStoreResource.TABLENAME_STORE)
                      .append(db.getTableQuote())
                      .append(" ").append(db.getSQLPart(SQLPart.SET)).append(" ")
                      .append(db.getColumnQuote())
                      .append(JDBCStoreResource.COLNAME_FILECONTENT)
                      .append(db.getColumnQuote()).append(db.getSQLPart(SQLPart.EQUAL)).append("? ")
                      .append(db.getSQLPart(SQLPart.WHERE)).append(" ")
                      .append(db.getColumnQuote()).append("ID").append(db.getColumnQuote())
                      .append(db.getSQLPart(SQLPart.EQUAL)).append(getGeneralID());
  
              final PreparedStatement stmt = res.prepareStatement(cmd.toString());
              try {
                  stmt.setBinaryStream(1, _in, ((Long) _size).intValue());
                  stmt.execute();
              } finally {
                  stmt.close();
              }
              size = _size;
          } catch (final EFapsException e) {
              throw e;
          } catch (final SQLException e) {
              JDBCStoreResource.LOG.error("write of content failed", e);
              throw new EFapsException(JDBCStoreResource.class, "write.SQLException", e);
          }
          setFileInfo(_fileName, size);
          return size;
      }
docs: The method writes the context (from the input stream) into a SQL blob.
  
  @param _in   input stream defined the content of the file
  @param _size length of the content (or negative meaning that the length
  is not known; then the content gets the length of readable
  bytes from the input stream) return size of the created
  temporary file object
  @param _fileName name of the file
  @return size of the file
  @throws EFapsException on error