code: @Override
      public String addContent(String spaceId,
                               String contentId,
                               String contentMimeType,
                               Map<String, String> userProperties,
                               long contentSize,
                               String contentChecksum,
                               InputStream content) {
          String path = baseDirectory + "/" + spaceId + "/" + contentId;
  
          log.trace("Writing to irods path: " + path +
                    " resource: " + storageResource);
  
          ConnectOperation co =
              new ConnectOperation(host, port, username, password, zone);
          byte[] buffer = new byte[BLOCK_SIZE];
  
          try {
              OutputStream ios;
  
              if (contentSize > 0) {
                  ios = new IrodsOutputStream(co.getConnection(), path,
                                              storageResource, contentSize);
              } else {
                  ios = new UnknownSizeOutputStream(co.getConnection(),
                                                    path,
                                                    storageResource,
                                                    true);
              }
              int read = 0;
              long total = 0;
              while ((read = content.read(buffer)) > -1) {
                  total += read;
                  ios.write(buffer, 0, read);
              }
              ios.close();
              log.trace("Finished writing irods path: " + path + " resource: " +
                        storageResource + " actual read: " + total +
                        " contentSize: " + contentSize);
  
              if (userProperties != null) {
                  MetaDataMap mDataMap = new MetaDataMap(path, co);
                  mDataMap.clear();
                  for (String e : userProperties.keySet()) {
                      mDataMap.put(e, userProperties.get(e), null);
                  }
              }
  
              return new IrodsOperations(co).stat(path).getChksum();
          } catch (IOException e) {
              log.error("Error ingesting file", e);
              throw new StorageException(e);
          }
      }
docs: Add new content to irods, content path is baseDirectory /spaceId/contentId
  
  @param spaceId
  @param contentId
  @param contentMimeType
  @param contentSize     may be set to 0 in some cases (entry through admin client)
  @param contentChecksum
  @param content
  @return