Package org.jboss.fresh.io

Examples of org.jboss.fresh.io.BufferWriter


    }
  }

  public void process(String exename, String[] params) throws Exception {

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

    String word = new String();

    String[] invalids = getInvalidSwitches(args, "cEJPisvVhwx", new String[]{"count", "regexp", "ignore-case", "no-messages", "invert-match", "version", "help", "words", "lines"});
    useRegExp = isSwitchActive(args, new String[]{"E", "J", "P", "regexp"});
View Full Code Here


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

    if (helpRequested()) {
      PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
      out.print("Usage: mkdir [--help] [-ex] PATHS\n");
      out.print("    PATHS : new directoryes to be made in the current working directory.\n");
      out.print("    --help : this help\n");
      out.close();
      log.debug("done");
      return;
    }

    PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
    VFS vfs = shell.getVFS();
    FileName pwd = new FileName(shell.getEnvProperty("PWD"));

    // List paths = new LinkedList();
View Full Code Here


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

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

    if (helpRequested()) {
      printUsage();
      log.debug("done");
      return;
View Full Code Here

  }


  public void printUsage() {
    PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
    out.println("Usage: events [--help] [-ex] <params> ...");
    out.println();
    out.println("  Instantiate new event listener and register it. The parameters after class are optional. If passed the constructor that takes one String parameter is used. If not present exception is thrown.");
    out.println("    events -a <class> -n <component_name> -p <pattern1> <pattern2> <pattern3> ...");
    out.println("  example:  events -a org.jboss.fresh.parsek.workflow.Conditon org.jboss.fresh.shell.commands.cms.PersistenceFilter conf1");
View Full Code Here

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

    if (helpRequested()) {
      PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
      out.print("Usage: echo [--help] [params]\n");
      out.print("    params : parameters to be sent to the pipeline.\n");
      out.print("    --help : this help\n");
      out.close();
      log.debug("done.");
View Full Code Here

    }

    public void setOutBuffer(Buffer out) {
        this.out = out;
        if (out == null) return;
        bwo = new BufferWriter(out);
        bwo.setTimeout(ShellImpl.PROC_INST_TIMEOUT);
        wout = new PrintWriter(bwo, true);
    }
View Full Code Here

    errProcessed = true;

    if (canThrowEx()) {
      throw new Exception(msg);
    } else {
      PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
      out.println(msg);
      out.close();
      return;
    }
  }
View Full Code Here

    errProcessed = true;

    if (canThrowEx()) {
      throw ex;
    } else {
      PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
      out.println(ex.getMessage());
      out.close();
      return;
    }
  }
View Full Code Here

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

        if (helpRequested()) {
            PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
            out.print("Usage: ls [--help] [-ex] [-out=OUTPUT] [-l] [--help]\n");
            out.print("       OUTPUT = string | filename | fileinfo; String is default.\n");
            out.print("       -l = long output; Makes difference only with -out=string.\n");
            out.print("       --help = Prints this.\n");
            out.close();
View Full Code Here

      }
    } catch (Exception e) {
      if(canThrowEx()) {
        throw e;
      } else {
        org.jboss.fresh.io.BufferWriter bw = new BufferWriter(getStdOut());
        PrintWriter tOut = new PrintWriter(bw);
        tOut.write(e.toString());
      }
    }
    out.close();
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.