Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.common.util
Class IOUtil

    java.lang.Object
      org.crosswire.common.util.IOUtil

    public final class IOUtil

extends Object

.

Author:
  Joe Walker
See Also:
  `The GNU Lesser General Public License for details.`

Field Summary
`private static org.slf4j.Logger` | `log` The log stream

Constructor Summary
`private` | `IOUtil()` Prevent instantiation

Method Summary
`static void` | `close(Closeable closeable)` Closes any `Closeable` object
`static void` | `close(ZipFile closeable)` Closes any `Closeable` object
`static void` | `unpackZip(File file, File destdir)` Unpack a zip file to a given directory.
`static void` | `unpackZip(File file, File destdir, boolean include, String... includeExcludes)` Unpack a zip file to a given directory.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    private static final org.slf4j.Logger log

  The log stream

Constructor Detail

### IOUtil

    private IOUtil()

  Prevent instantiation

Method Detail

### unpackZip

    public static void unpackZip(File file,
                                 File destdir)
                          throws IOException

  Unpack a zip file to a given directory. Honor the paths as given in the zip file.

  Parameters:
    `file` - The zip file to download
    `destdir` - The directory to unpack up
  Throws:
    `IOException` - If there is an file error

### unpackZip

    public static void unpackZip(File file,
                                 File destdir,
                                 boolean include,
                                 String... includeExcludes)
                          throws IOException

  Unpack a zip file to a given directory. Honor the paths as given in the zip file.

  Parameters:
    `file` - The zip file to download
    `destdir` - The directory to unpack up
    `include` - true to indicate the next arguments will be a filter that only includes what is specified.
    `includeExcludes` - a list of case insensitive patterns that will act as an inclusion or exclusion prefix
  Throws:
    `IOException` - If there is an file error

### close

    public static void close(Closeable closeable)

  Closes any `Closeable` object

  Parameters:
    `closeable` - The zip file to close

### close

    public static void close(ZipFile closeable)

  Closes any `Closeable` object

  Parameters:
    `closeable` - The zip file to close

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2015
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD