|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.archive.crawler.util.IoUtils
public class IoUtils
Logging utils.
| Constructor Summary | |
|---|---|
IoUtils()
|
|
| Method Summary | |
|---|---|
static java.io.InputStream |
getInputStream(java.io.File basedir,
java.lang.String pathOrUrl)
Get inputstream. |
static java.io.InputStream |
getInputStream(java.lang.String pathOrUrl)
|
static void |
unzip(java.io.File zipFile,
java.io.File destinationDir)
Use ant to unjar. |
static void |
unzip(java.io.File zipFile,
java.io.File destinationDir,
boolean overwrite)
Use ant to unjar. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IoUtils()
| Method Detail |
|---|
public static java.io.InputStream getInputStream(java.lang.String pathOrUrl)
public static java.io.InputStream getInputStream(java.io.File basedir,
java.lang.String pathOrUrl)
ASSUMPTION: Scheme on any url will probably only ever be 'file' or 'http'.
basedir - If passed fileOrUrl is a file path and
it is not absolute, prefix with this basedir (May be null then
no prefixing will be done).pathOrUrl - Pass path to a file on disk or pass in a URL.
public static void unzip(java.io.File zipFile,
java.io.File destinationDir)
zipFile - File to unzip.destinationDir - Where to unzip to.
public static void unzip(java.io.File zipFile,
java.io.File destinationDir,
boolean overwrite)
zipFile - File to unzip.destinationDir - Where to unzip to.overwrite - Whether to overwrite existing content.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||