| java.lang.Object org.archive.crawler.util.IoUtils
IoUtils | public class IoUtils (Code) | | Logging utils.
author: stack |
getInputStream | public static InputStream getInputStream(File basedir, String pathOrUrl)(Code) | | Get inputstream.
This method looks at passed string and tries to judge it a
filesystem path or an URL. It then gets an InputStream on to
the file or URL.
ASSUMPTION: Scheme on any url will probably only ever be 'file'
or 'http'.
Parameters: basedir - If passed fileOrUrl is a file path andit is not absolute, prefix with this basedir (May be null thenno prefixing will be done). Parameters: pathOrUrl - Pass path to a file on disk or pass in a URL. An input stream. |
unzip | public static void unzip(File zipFile, File destinationDir)(Code) | | Use ant to unjar.
Parameters: zipFile - File to unzip. Parameters: destinationDir - Where to unzip to. |
unzip | public static void unzip(File zipFile, File destinationDir, boolean overwrite)(Code) | | Use ant to unjar.
Parameters: zipFile - File to unzip. Parameters: destinationDir - Where to unzip to. Parameters: overwrite - Whether to overwrite existing content. |
|
|