1 19 20 package org.netbeans.spi.sendopts; 21 22 import java.io.File ; 23 import java.io.InputStream ; 24 import java.io.OutputStream ; 25 import java.io.PrintStream ; 26 27 35 public final class Env { 36 private InputStream is; 37 private PrintStream os; 38 private PrintStream err; 39 private File currentDir; 40 41 42 Env(InputStream is, OutputStream os, OutputStream err, File currentDir) { 43 this.is = is; 44 this.os = os instanceof PrintStream ? (PrintStream )os : new PrintStream (os); 45 this.err = err instanceof PrintStream ? (PrintStream )err : new PrintStream (err); 46 this.currentDir = currentDir; 47 } 48 49 53 public PrintStream getOutputStream() { 54 return os; 55 } 56 60 public PrintStream getErrorStream() { 61 return err; 62 } 63 64 70 public File getCurrentDirectory () { 71 return currentDir; 72 } 73 74 78 public InputStream getInputStream() { 79 return is; 80 } 81 } 82 | Popular Tags |