示例#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 InputStream getInputStream(string location, string file)
 {
     if (location != null)
     {
         return(StreamFactory.getInputStream(StreamFactory.resolve(location), location, file));
     }
     return(StreamFactory.getInputStream("DIRECTORY", location, file));
 }
示例#3
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);
        }