Package org.jboss.fresh.shell.commands

Source Code of org.jboss.fresh.shell.commands.DateExe

package org.jboss.fresh.shell.commands;

import org.jboss.fresh.shell.AbstractExecutable;
import org.jboss.fresh.io.BufferWriter;

import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
* @author strukelj
* @version $Revision$
* @created 2005.3.31, 14:43:22
* @date $Date$
* @source $Source$
* @modified $Author$
*/
public class DateExe  extends AbstractExecutable {
    public static final String VERSION = "$Header$";

    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    protected void process(String exepath, String[] args) throws Exception {
        PrintWriter pout = new PrintWriter(new BufferedWriter(new BufferWriter(getStdOut())));
        pout.print(sdf.format(new Date()));
        pout.close();
    }
}
TOP

Related Classes of org.jboss.fresh.shell.commands.DateExe

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.