code: public Date[] purgeDatastream(Context context,
                                    String pid,
                                    String datastreamID,
                                    Date startDT,
                                    Date endDT,
                                    String logMessage) throws ServerException {
          try {
              CreatorJournalEntry cje =
                      new CreatorJournalEntry(METHOD_PURGE_DATASTREAM, context);
              cje.addArgument(ARGUMENT_NAME_PID, pid);
              cje.addArgument(ARGUMENT_NAME_DS_ID, datastreamID);
              cje.addArgument(ARGUMENT_NAME_START_DATE, startDT);
              cje.addArgument(ARGUMENT_NAME_END_DATE, endDT);
              cje.addArgument(ARGUMENT_NAME_LOG_MESSAGE, logMessage);
              return (Date[]) cje.invokeAndClose(delegate, writer);
          } catch (JournalException e) {
              throw new GeneralException("Problem creating the Journal", e);
          }
      }
docs: Create a journal entry, add the arguments, and invoke the method.