Package org.jboss.fresh.io

Examples of org.jboss.fresh.io.InputStreamBuffer


    InBuffer in = null;
    if (joblist.size() == 0) {

      if (cmdl.getSLStdInRedir() != null) {
        try {
          InputStreamBuffer bin = new InputStreamBuffer(new FileInputStream(cmdl.getSLStdInRedir()), cmdl.isSLInObjMode());
          bin.setProperties(env);
          in = bin;
        } catch (IOException ex) {
          throw new ShellException("Exception occured while initializing input buffer: " + ex.toString());
        }

      } else if (cmdl.getStdInRedir() != null) {
        try {
          //in=new InputStreamBuffer(new VFSInputStream(new SecureVFS(vfs, uctx), cmdl.getStdInRedir()), cmdl.isInObjMode());
          if(cmdl.getStdInLines() != null) {
            String enc = env.getProperty("ENC");
            ByteArrayInputStream bain;
            if(enc != null) {
              bain = new ByteArrayInputStream(cmdl.getStdInLines().getBytes("ENC"));
            } else {
              bain = new ByteArrayInputStream(cmdl.getStdInLines().getBytes());
            }
            InputStreamBuffer bin = new InputStreamBuffer(bain, false);
            bin.setProperties(env);
            in = bin;
           
          } else {
            FileName fname = new FileName(cmdl.getStdInRedir());
            if (fname.isRelative()) {
              fname = new FileName(getEnvProperty("PWD")).absolutize(fname);
            }
            InputStreamBuffer bin = new InputStreamBuffer(new VFSInputStream(new SecureVFS(vfs, uctx), fname.toString()), cmdl.isInObjMode());
            bin.setProperties(env);
            in = bin;
          }

        } catch (IOException ex) {
          throw new ShellException("Exception occured while initializing input buffer: " + ex.toString());
View Full Code Here

TOP

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

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.