class TransferArgs {

  public static TransferArgs getParamsInternal(final int rank,
                                               final String[] args,
                                               final boolean analyseFollow) {
    if (args == null || args.length == 0) {
      logger.error("Arguments cannot be empty or null");
      return null;
    }
    final String[] realArgs = getRealArgs(rank, args);

    // Now set default values from configuration
    final TransferArgs transferArgs1 = new TransferArgs();
    transferArgs1.setBlockSize(Configuration.configuration.getBlockSize());

    final CommandLineParser parser = new DefaultParser();
    try {
      final CommandLine cmd = parser.parse(TRANSFER_OPTIONS, realArgs, true);
      if (getTransferMinimalArgs(transferArgs1, cmd)) {
        return null;
      }
      if (checkDelayStart(transferArgs1, cmd)) {
        return null;
      }
      if (checkExtraTransferArgs(transferArgs1, cmd)) {
        return null;
      }
      checkLog(transferArgs1, cmd);
      checkOutput(cmd);
    } catch (final ParseException e) {
      printHelp();
      logger.error("Arguments are incorrect", e);
      return null;
    }
    return finalizeTransferArgs(analyseFollow, transferArgs1);
  }

  public  TransferArgs();

}