OSDN Git Service

simplify the source
[rec10/rec10-git.git] / jTsSplitter / trunk / src / jtssplitter / Main.java
index c37ebab..527ffce 100644 (file)
@@ -2,9 +2,9 @@
  * To change this template, choose Tools | Templates
  * and open the template in the editor.
  */
-
 package jtssplitter;
 
+
 /**
  *
  * @author Administrator
@@ -13,24 +13,26 @@ public class Main {
 
     /**
      * @param args the command line arguments
+     *
      */
-    public static boolean debug_mode=false;
     public static void main(String[] args) {
         // TODO code application logic here
-        String inf,outf;
-        int ch=0;
-        if (args.length>1){
-            inf=args[0];
-            outf=args[1];
-            if (args.length>2){
-                ch=Integer.parseInt(args[2].trim(),10);
+        String inf;
+        String outf;
+        int ch = 0;
+        inf = "";
+        outf = "";
+        for (int i = 0; i < args.length; i++) {
+            System.out.println(args[i]);
+        }
+        if (args.length > 1) {
+            inf = args[0];
+            outf = args[1];
+            if (args.length > 2) {
+                ch = Integer.parseInt(args[2].trim(), 10);
             }
         }
-        Tsfile t1=new Tsfile();
-        //t1.readTs("D:\\jTssplitter\\test-sp.ts");
-        inf="/home/ftpusr/ftp-tmp/tester/testcs30.tsmix";
-        outf="/home/ftpusr/ftp-tmp/tester/test.tssp.ts";
-        t1.splitTS(inf,outf,0);
+        Tsfile t1 = new Tsfile();
+        t1.splitTS(inf, outf, ch);
     }
-
 }