public final class CatalogHelper extends Object
Modifier and Type | Method and Description |
---|---|
static String |
after(String text,
String after)
Returns the string after the given token
|
static String |
before(String text,
String before)
Returns the string before the given token
|
static String |
between(String text,
String after,
String before)
Returns the string between the given tokens
|
static boolean |
isEmpty(Object value)
Tests whether the value is null or an empty string.
|
static boolean |
isNotEmpty(Object value)
Tests whether the value is not null or an empty string.
|
static void |
loadLines(InputStream in,
List<String> lines)
Loads the entire stream into memory as a String and returns it.
|
static String |
loadText(InputStream in)
Loads the entire stream into memory as a String and returns it.
|
static boolean |
matchWildcard(String name,
String pattern)
Matches the name with the pattern.
|
static String |
removeLeadingAndEndingQuotes(String s)
Removes all leading and ending quotes (single and double) from the string
|
public static void loadLines(InputStream in, List<String> lines) throws IOException
IOException
public static String loadText(InputStream in) throws IOException
IOException
public static boolean matchWildcard(String name, String pattern)
name
- the namepattern
- the patternpublic static String after(String text, String after)
text
- the textafter
- the tokenpublic static String before(String text, String before)
text
- the textbefore
- the tokenpublic static String between(String text, String after, String before)
text
- the textafter
- the before tokenbefore
- the after tokenpublic static boolean isEmpty(Object value)
value
- the value, if its a String it will be tested for text length as wellpublic static boolean isNotEmpty(Object value)
value
- the value, if its a String it will be tested for text length as wellpublic static String removeLeadingAndEndingQuotes(String s)
s
- the stringApache Camel