/** * Expand the specified input stream into the specified directory, creating * a file named from the specified relative path. * * @param input InputStream to be copied * @param docBase Document base directory into which we are expanding * @param name Relative pathname of the file to be created * * @exception IOException if an input/output error occurs */ protected void expand(InputStream input, File docBase, String name) throws IOException { ExpandWar.expand(input,docBase,name); }
/** * Expand the WAR file found at the specified URL into an unpacked * directory structure, and return the absolute pathname to the expanded * directory. * * @param war URL of the web application archive to be expanded * (must start with "jar:") * * @exception IllegalArgumentException if this is not a "jar:" URL * @exception IOException if an input/output error was encountered * during expansion */ protected String expand(URL war) throws IOException { return ExpandWar.expand(host,war); }
/** * Expand the specified input stream into the specified directory, creating * a file named from the specified relative path. * * @param input InputStream to be copied * @param docBase Document base directory into which we are expanding * @param name Relative pathname of the file to be created * * @exception IOException if an input/output error occurs * * @deprecated */ protected static void expand(InputStream input, File docBase, String name) throws IOException { File file = new File(docBase, name); expand(input, file); }
/** * Expand the specified input stream into the specified directory, creating * a file named from the specified relative path. * * @param input InputStream to be copied * @param docBase Document base directory into which we are expanding * @param name Relative pathname of the file to be created * @return A handle to the expanded File * * @exception IOException if an input/output error occurs * * @deprecated */ protected static File expand(InputStream input, File docBase, String name) throws IOException { File file = new File(docBase, name); expand(input, file); return file; }
/** * Expand the specified input stream into the specified directory, creating * a file named from the specified relative path. * * @param input InputStream to be copied * @param docBase Document base directory into which we are expanding * @param name Relative pathname of the file to be created * @return A handle to the expanded File * * @exception IOException if an input/output error occurs * * @deprecated */ protected static File expand(InputStream input, File docBase, String name) throws IOException { File file = new File(docBase, name); expand(input, file); return file; }
/** * Expand the specified input stream into the specified directory, creating * a file named from the specified relative path. * * @param input InputStream to be copied * @param docBase Document base directory into which we are expanding * @param name Relative pathname of the file to be created * @return A handle to the expanded File * * @exception IOException if an input/output error occurs * * @deprecated */ protected static File expand(InputStream input, File docBase, String name) throws IOException { File file = new File(docBase, name); expand(input, file); return file; }
/** * Expand the WAR file found at the specified URL into an unpacked * directory structure, and return the absolute pathname to the expanded * directory. * * @param host Host war is being installed for * @param war URL of the web application archive to be expanded * (must start with "jar:") * * @exception IllegalArgumentException if this is not a "jar:" URL * @exception IOException if an input/output error was encountered * during expansion */ public static String expand(Host host, URL war) throws IOException { // Calculate the directory name of the expanded directory String pathname = war.toString().replace('\\', '/'); if (pathname.endsWith("!/")) { pathname = pathname.substring(0, pathname.length() - 2); } int period = pathname.lastIndexOf('.'); if (period >= pathname.length() - 4) pathname = pathname.substring(0, period); int slash = pathname.lastIndexOf('/'); if (slash >= 0) { pathname = pathname.substring(slash + 1); } return expand(host, war, pathname); }
host.getLogger().debug(" Proposed directory name: " + pathname); return expand(host, war, pathname);
contextPath = "ROOT"; docBase = ExpandWar.expand(host, war, contextPath); file = new File(docBase); docBase = file.getCanonicalPath(); if (unpackWARs) { URL war = new URL("jar:" + warFile.toURL() + "!/"); docBase = ExpandWar.expand(host, war, context.getPath()); file = new File(docBase); docBase = file.getCanonicalPath();
expand(input, expandedFile); long lastModified = jarEntry.getTime(); if ((lastModified != -1) && (lastModified != 0)) {
docBase = ExpandWar.expand(host, war, contextPath);
docBase = ExpandWar.expand(host, war);
expand(input, expandedFile); long lastModified = jarEntry.getTime(); if ((lastModified != -1) && (lastModified != 0)) {
URL war = UriUtil.buildJarUrl(new File(docBase)); if (unpackWARs) { docBase = ExpandWar.expand(host, war, pathName); file = new File(docBase); docBase = file.getCanonicalPath(); ExpandWar.expand(host, war, pathName); docBase = ExpandWar.expand(host, war, pathName); file = new File(docBase); docBase = file.getCanonicalPath();
URL war = UriUtil.buildJarUrl(new File(docBase)); if (unpackWARs) { docBase = ExpandWar.expand(host, war, pathName); file = new File(docBase); docBase = file.getCanonicalPath(); ExpandWar.expand(host, war, pathName); docBase = ExpandWar.expand(host, war, pathName); file = new File(docBase); docBase = file.getCanonicalPath();