public static OutputStream getOutputStream(string location, string file, bool append) { if (location != null) { return(StreamFactory.getOutputStream(StreamFactory.resolve(location), location, file, append)); } return(StreamFactory.getOutputStream("DIRECTORY", location, file)); }
public static InputStream getInputStream(string location, string file) { if (location != null) { return(StreamFactory.getInputStream(StreamFactory.resolve(location), location, file)); } return(StreamFactory.getInputStream("DIRECTORY", location, file)); }
public static OutputStream getOutputStream(string format, string location, string file) { if (String.instancehelper_equals(format, "ZIP_FILE")) { [email protected]("WARNING: overwriting ZIP or JAR file!"); return(StreamFactory.getOutputStream(StreamFactory.resolve(location), location, file, false)); } if (String.instancehelper_equals(format, "DIRECTORY")) { return(StreamFactory.getOutputStream("DIRECTORY", location, file, false)); } string text = "Format not supported for writing"; throw new IOException(text); }