|
| static String | getVersion (final String archive) |
| |
| static String | findClassPathElement (final String pattern) |
| |
| static ZipEntry | findInJar (final File file, final String pattern) throws IOException |
| |
| static ZipEntry | findInJar (final JarFile jar, final String pattern) |
| |
| static ZipEntry | findInJar (final ZipInputStream jarInputStream, final String pattern) throws IOException |
| |
| static URI | findArchive (final String archiveName) |
| |
| static Pair< InputStream, Long > | makeInputStream (final String path) throws IOException |
| |
| static ObjectInputStream | makeMonitoredInputStream (final String path, final String message, final Component parentComponent) throws IOException |
| |
| static String | trimPath (final String path0) |
| |
| static String | extractText (final String query) |
| |
| static void | main (final String[] args) |
| |
File DialogUtils
- Author
- Bernard Bou
◆ FileUtils()
| grammarscope.common.utils.FileUtils.FileUtils |
( |
| ) |
|
|
private |
◆ extractText()
| static String grammarscope.common.utils.FileUtils.extractText |
( |
final String |
query | ) |
|
|
static |
Extract text from query
- Parameters
-
- Returns
- text or query if failed
◆ findArchive()
| static URI grammarscope.common.utils.FileUtils.findArchive |
( |
final String |
archiveName | ) |
|
|
static |
Find archive in path or runnable
- Parameters
-
- Returns
- archive's uri
◆ findClassPathElement()
| static String grammarscope.common.utils.FileUtils.findClassPathElement |
( |
final String |
pattern | ) |
|
|
static |
Find file path matching pattern in classpath
- Parameters
-
- Returns
- path
◆ findInJar() [1/3]
| static ZipEntry grammarscope.common.utils.FileUtils.findInJar |
( |
final File |
file, |
|
|
final String |
pattern |
|
) |
| throws IOException |
|
static |
Find entry in JAR file
- Parameters
-
| file | archive file |
| pattern | pattern |
- Returns
- jar entry with matching file path
- Exceptions
-
◆ findInJar() [2/3]
| static ZipEntry grammarscope.common.utils.FileUtils.findInJar |
( |
final JarFile |
jar, |
|
|
final String |
pattern |
|
) |
| |
|
static |
Find entry in JAR file
- Parameters
-
| jar | Jarfile |
| pattern | pattern |
- Returns
- jar entry with matching file path
◆ findInJar() [3/3]
| static ZipEntry grammarscope.common.utils.FileUtils.findInJar |
( |
final ZipInputStream |
jarInputStream, |
|
|
final String |
pattern |
|
) |
| throws IOException |
|
static |
Find entry in JAR stream
- Parameters
-
| jarInputStream | jar input stream |
| pattern | pattern |
- Returns
- jar entry with matching file path
- Exceptions
-
◆ getVersion()
| static String grammarscope.common.utils.FileUtils.getVersion |
( |
final String |
archive | ) |
|
|
static |
Get version (=manifest time stamp)
- Parameters
-
| archive | archive to look for |
- Returns
- path
◆ main()
| static void grammarscope.common.utils.FileUtils.main |
( |
final String[] |
args | ) |
|
|
static |
◆ makeInputStream()
| static Pair<InputStream, Long> grammarscope.common.utils.FileUtils.makeInputStream |
( |
final String |
path | ) |
throws IOException |
|
static |
Get stream
- Parameters
-
- Returns
- input stream, content-length
- Exceptions
-
◆ makeMonitoredInputStream()
| static ObjectInputStream grammarscope.common.utils.FileUtils.makeMonitoredInputStream |
( |
final String |
path, |
|
|
final String |
message, |
|
|
final Component |
parentComponent |
|
) |
| throws IOException |
|
static |
Get monitored stream
- Parameters
-
| path | path to grammar |
| message | message |
| parentComponent | parent component |
- Returns
- input stream
- Exceptions
-
◆ trimPath()
| static String grammarscope.common.utils.FileUtils.trimPath |
( |
final String |
path0 | ) |
|
|
static |
Trim path
- Parameters
-
- Returns
- trimmed path
The documentation for this class was generated from the following file:
- grammarscope/common/src/main/java/grammarscope/common/utils/FileUtils.java