public class ParsingUtils
extends java.lang.Object
Constructor and Description |
---|
ParsingUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
extractClasspath(java.lang.String source,
java.lang.String delimiter)
Extracts a classpath string from a source text.
|
static java.lang.String |
extractRunnableCommand(java.lang.String source)
Extracts a string from another string which can be used as a command in
shell.
|
static long |
parseBytes(java.lang.String string)
Parses the count of bytes from a string.
|
static int |
parseBytesAsMegs(java.lang.String string)
Parses the given string as a number representing megs.
|
public static int parseBytesAsMegs(java.lang.String string) throws java.text.ParseException
string
- the value stringjava.text.ParseException
- the parse exceptionpublic static long parseBytes(java.lang.String string) throws java.text.ParseException
string
- the value stringjava.text.ParseException
- the parse exceptionpublic static java.lang.String extractRunnableCommand(java.lang.String source)
source
- Source stringpublic static java.lang.String extractClasspath(java.lang.String source, java.lang.String delimiter)
source
- the source stringdelimiter
- the delimiter