
// this needs to be modified to work with the new java 7 date class

package tap.sample;

import tap.*;
import quantbench.Candle;

public class Subscribe {
    public static main(String[] args) throws Exception {
        Tap tap = new Tap();
        tap.startTime("2011-01-03 10:40:00.000");
        tap.endTime("2011-01-03 10:50:00.000");
        Pipe<Candle> candles = tap.subscribe("//cta/candle/1min[AAPL]");
        while (candles.more()) {
            Candle m = candles.get();
            Date time = Tap.newDate(m.getStartTime());
            System.out.println(time.toString + " symbol " + m.getSymbol() + 
                               " open " + m.getOpen() + " volume " + m.getVolume());
        }
    }
}
@@ -1,9 +1,8 @@
-%0A
 // this 
@@ -149,16 +149,112 @@
 cribe %7B%0A
+    %0A    // Usage: hadoop jar yourjar.jar -s 2011-01-03 10:40:00.000 -e 2011-01-03 10:50:00.000%0A
     publ
@@ -314,26 +314,50 @@
     
-Tap tap = new Tap(
+CommandOptions o = new CommandOptions(args
 );%0A 
@@ -367,97 +367,38 @@
     
-tap.startTime(%222011-01-03 10:40:00.000%22);%0A        tap.endTime(%222011-01-03 10:50:00.000%22);
+Tap tap = new Tap(o);%0A        
 %0A   

Fix Tap constructor, pass start and end time via command line arguments.