Пример #1
0
 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));
 }
Пример #2
0
        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);
        }