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());