Beispiel #1
0
  public static void main1(String[] args) throws IOException {

    Cmd cmd = MainUtils.parseArguments(args);
    if (cmd.args.length < 1) {
      MainUtils.printHelpNoFlags("file name");
      return;
    }

    ReadableByteChannel ch = null;
    try {
      ch = NIOUtils.readableChannel(new File(cmd.args[0]));
      dumpTSPackets(ch);
    } finally {
      NIOUtils.closeQuietly(ch);
    }
  }
Beispiel #2
0
  public static void main(String[] args) throws IOException {
    Cmd cmd = MainUtils.parseArguments(args);
    if (cmd.args.length < 2) {
      MainUtils.printHelp(
          new HashMap<String, String>() {
            {
            }
          },
          "pid_from:pid_to,[pid_from:pid_to...]",
          "file");
      return;
    }

    IntIntMap replaceSpec = parseReplaceSpec(cmd.getArg(0));

    SeekableByteChannel ch = null;
    try {
      ch = NIOUtils.rwFileChannel(new File(cmd.getArg(1)));

      new MTSReplacePid(replaceSpec).readTsFile(ch);
    } finally {
      NIOUtils.closeQuietly(ch);
    }
  }