public final class FileUtils
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
extractText(java.lang.String query)
Extract text from query
|
static java.net.URI |
findArchive(java.lang.String archiveName)
Find archive in path or runnable
|
static java.lang.String |
findClassPathElement(java.lang.String pattern)
Find file path matching pattern in classpath
|
static java.util.zip.ZipEntry |
findInJar(java.io.File file,
java.lang.String pattern)
Find entry in JAR file
|
static java.util.zip.ZipEntry |
findInJar(java.util.jar.JarFile jar,
java.lang.String pattern)
Find entry in JAR file
|
static java.util.zip.ZipEntry |
findInJar(java.util.zip.ZipInputStream jarInputStream,
java.lang.String pattern)
Find entry in JAR stream
|
static java.lang.String |
getVersion(java.lang.String archive)
Get version (=manifest time stamp)
|
static void |
main(java.lang.String[] args)
Main
|
static Pair<java.io.InputStream,java.lang.Long> |
makeInputStream(java.lang.String path)
Get stream
|
static java.io.ObjectInputStream |
makeMonitoredInputStream(java.lang.String path,
java.lang.String message,
java.awt.Component parentComponent)
Get monitored stream
|
static java.lang.String |
trimPath(java.lang.String path0)
Trim path
|
public static java.lang.String getVersion(java.lang.String archive)
archive - archive to look forpublic static java.lang.String findClassPathElement(java.lang.String pattern)
pattern - patternpublic static java.util.zip.ZipEntry findInJar(java.io.File file,
java.lang.String pattern)
throws java.io.IOException
file - archive filepattern - patternjava.io.IOException - exceptionpublic static java.util.zip.ZipEntry findInJar(java.util.jar.JarFile jar,
java.lang.String pattern)
jar - Jarfilepattern - patternpublic static java.util.zip.ZipEntry findInJar(java.util.zip.ZipInputStream jarInputStream,
java.lang.String pattern)
throws java.io.IOException
jarInputStream - jar input streampattern - patternjava.io.IOException - exceptionpublic static java.net.URI findArchive(java.lang.String archiveName)
archiveName - archive namepublic static Pair<java.io.InputStream,java.lang.Long> makeInputStream(java.lang.String path) throws java.io.IOException
path - path to grammarjava.io.IOException - exceptionpublic static java.io.ObjectInputStream makeMonitoredInputStream(java.lang.String path,
java.lang.String message,
java.awt.Component parentComponent)
throws java.io.IOException
path - path to grammarmessage - messageparentComponent - parent componentjava.io.IOException - exceptionpublic static java.lang.String trimPath(java.lang.String path0)
path0 - pathpublic static java.lang.String extractText(java.lang.String query)
query - querypublic static void main(java.lang.String[] args)
args - unused