Package org.jboss.fresh.io

Examples of org.jboss.fresh.io.BufferWriter


  private static transient org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(DiagExe.class);

  public void process(String exepath, String[] params) throws Exception {
    log.debug("entered");

    PrintWriter2 pout = new PrintWriter2(new BufferWriter(getStdOut()));


    if (helpRequested()) {
      pout.println("Usage: diag [--help] [-ex] [-gc]");
      pout.println("    -gc : run garbage collection before getting diagnostics.");
View Full Code Here


  private int total = 0;

  public void process(String exepath, String[] params) throws Exception {
    log.debug("entered");

    PrintWriter2 pout = new PrintWriter2(new BufferWriter(getStdOut()));

    if (helpRequested()) {
      printHelp(pout);
      return;
    }
View Full Code Here

  public void throwException(String msg) throws Exception {
    if (canThrowEx()) {
      throw new RuntimeException(msg);
    } else {
      PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
      out.println(msg);
      out.close();
      log.debug("done");
      return;
    }
View Full Code Here

    String inType = IMG_TYPE;
    String outType = null;

    String swidth = null, sheight = null, smaxWidth = null, smaxHeight = null;

    java.io.PrintWriter out = new PrintWriter(new BufferedWriter(new BufferWriter(getStdOut())));


    for (int i = 0; i < params.length; i++) {
      String val = params[i];
View Full Code Here

  }


  private void printUsage() {

    PrintWriter pout = new PrintWriter(new BufferedWriter(new BufferWriter(getStdOut())));

    pout.println("Usage:\n");
    pout.println("  imgresize [--help] [-ex] [-width <width>] [-height <height>] [-maxWidth <maxWidth>] [-maxHeight <maxHeight>] [-in <inType>] [-out <outType>]");
    pout.println("  inType, outType : type of input and output [img | obj], img-binary image(default),  obj-BufferedImage object");
    pout.println("  --help : this help");
View Full Code Here

   
  public void throwException(String msg) throws Exception {
    if (canThrowEx()) {
      throw new Exception(msg);
    } else {
      PrintWriter2 out = new PrintWriter2(new BufferWriter(getStdOut()));
      out.println(msg);
      out.close();
      System.out.println("[CropBinaryExe] : done.");
      return;
    }
View Full Code Here

  public void process(String exepath, String[] params) throws Exception {
    log.debug("entered");

    if (helpRequested()) {
      PrintWriter2 out = new PrintWriter2(new BufferWriter(getStdOut()));
      out.println("Usage: antbuild [--help] [-o] path param1, param2, ..., paramN");
      out.println("        -o : display output of the building process.");
      out.println("      path : path to the \"build.xml\" file.");
      out.println();
      out.println(" --help : this help.");
      out.flush();
      out.close();
      log.debug("done");
      return;
    }


    pout = new PrintWriter2(new BufferedWriter(new BufferWriter(getStdOut())));

    String buildPath = null;
    boolean displayOutput = false;

    StringBuffer args = new StringBuffer();
View Full Code Here

  public void process(String exepath, String[] params) throws Exception {
    log.debug("entered");

    if ((params.length == 0) || helpRequested()) {
      PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
      out.print("Usage: urlenc [--help] [-ex] [e|d] url\n");
      out.print("    e : encodes the url taken from the pipeline and sends the encoded url to the pipeline.\n");
      out.print("    d : decodes the url taken from the pipeline and sends the decoded url to the pipeline.\n");
      out.print("    --help : this help\n");
      out.close();
      log.debug("done");
      return;
    }

    PrintWriter err = new PrintWriter(new BufferWriter(getStdOut()));

    try {

      for (int i = 0; i < params.length; i++) {
View Full Code Here

  public void throwException(String msg) throws Exception {
    if (canThrowEx()) {
      throw new Exception(msg);
    } else {
      PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
      out.println(msg);
      out.close();
      log.debug("done");
      return;
    }
View Full Code Here

  public void process(String exename, String[] params) throws Exception {
    log.debug("entered");

    // help
    if (helpRequested()) {
      PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
      out.print("Usage: cropbinary [-ex] [--help] [-x1 <x1>] [-y1 <y1>] [-x2 <x2>] [-y2 <y2>] [-in <input_type>] [-out <output_type>]");
      out.print("\n  -x1, -y1, -x2 -y2 : to specify the rectangle coordinates for the new image.");
      out.print("\n    -in : followed by the input_type - specifies the type of object taken from the pipeline [obj | img]");
      out.print("\n   -out : followed by the output_type - specifies the type of object put into the pipeline [obj | img] - if none specified then output_type equals input_type.");
      out.print("\n\n --help : this help");
View Full Code Here

TOP

Related Classes of org.jboss.fresh.io.BufferWriter

Copyright © 2018 www.massapicom. 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.