org.apache.geronimo.deployment.util
Class DeploymentUtil

java.lang.Object
  extended by org.apache.geronimo.deployment.util.DeploymentUtil

public final class DeploymentUtil
extends Object


Nested Class Summary
static class DeploymentUtil.EmptyInputStream
           
 
Field Summary
static File DUMMY_JAR_FILE
           
 
Method Summary
static void close(InputStream thing)
           
static void close(JarFile thing)
           
static void close(OutputStream thing)
           
static void close(Reader thing)
           
static void close(Writer thing)
           
static void copyFile(File source, File destination)
           
static void copyToPackedJar(JarFile inputJar, File outputFile)
           
static JarFile createJarFile(File jarFile)
           
static URL createJarURL(JarFile jarFile, String path)
           
static File createTempDir()
           
static File createTempFile()
           
static void flush(OutputStream thing)
           
static void flush(Writer thing)
           
static void jarDirectory(File sourceDirecotry, File destinationFile)
           
static Collection listRecursiveFiles(File file)
           
static void listRecursiveFiles(File file, Collection collection)
           
static String readAll(URL url)
           
static boolean recursiveDelete(File root)
           
static boolean recursiveDelete(File root, Collection unableToDeleteCollection)
           
static File toFile(JarFile jarFile)
           
static File toFile(JarFile jarFile, String path)
           
static File toTempFile(JarFile jarFile, String path)
           
static File toTempFile(URL url)
           
static void unzipToDirectory(ZipFile zipFile, File destDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DUMMY_JAR_FILE

public static final File DUMMY_JAR_FILE
Method Detail

createTempDir

public static File createTempDir()
                          throws IOException
Throws:
IOException

createTempFile

public static File createTempFile()
                           throws IOException
Throws:
IOException

copyFile

public static void copyFile(File source,
                            File destination)
                     throws IOException
Throws:
IOException

toTempFile

public static File toTempFile(JarFile jarFile,
                              String path)
                       throws IOException
Throws:
IOException

toTempFile

public static File toTempFile(URL url)
                       throws IOException
Throws:
IOException

readAll

public static String readAll(URL url)
                      throws IOException
Throws:
IOException

toFile

public static File toFile(JarFile jarFile)
                   throws IOException
Throws:
IOException

toFile

public static File toFile(JarFile jarFile,
                          String path)
                   throws IOException
Throws:
IOException

createJarURL

public static URL createJarURL(JarFile jarFile,
                               String path)
                        throws MalformedURLException
Throws:
MalformedURLException

createJarFile

public static JarFile createJarFile(File jarFile)
                             throws IOException
Throws:
IOException

copyToPackedJar

public static void copyToPackedJar(JarFile inputJar,
                                   File outputFile)
                            throws IOException
Throws:
IOException

jarDirectory

public static void jarDirectory(File sourceDirecotry,
                                File destinationFile)
                         throws IOException
Throws:
IOException

unzipToDirectory

public static void unzipToDirectory(ZipFile zipFile,
                                    File destDir)
                             throws IOException
Throws:
IOException

recursiveDelete

public static boolean recursiveDelete(File root,
                                      Collection unableToDeleteCollection)

recursiveDelete

public static boolean recursiveDelete(File root)

listRecursiveFiles

public static Collection listRecursiveFiles(File file)

listRecursiveFiles

public static void listRecursiveFiles(File file,
                                      Collection collection)

flush

public static void flush(OutputStream thing)

flush

public static void flush(Writer thing)

close

public static void close(JarFile thing)

close

public static void close(InputStream thing)

close

public static void close(OutputStream thing)

close

public static void close(Reader thing)

close

public static void close(Writer thing)


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.