Package org.apache.camel.catalog.impl
Class CatalogHelper
java.lang.Object
org.apache.camel.catalog.impl.CatalogHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanTests whether the value is null or an empty string.static booleanisNotEmpty(Object value) Tests whether the value is not null or an empty string.loadLines(InputStream in) Loads the entire stream into memory as a String and returns it.static voidloadLines(InputStream in, List<String> lines) Loads the entire stream into memory as a String and returns it.static StringloadText(InputStream in) Loads the entire stream into memory as a String and returns it.static booleanmatchWildcard(String name, String pattern) Matches the name with the pattern.
-
Method Details
-
loadLines
Loads the entire stream into memory as a String and returns it. Notice: This implementation appends a \n as line terminator at the of the text. Warning, don't use for crazy big streams :)- Throws:
IOException
-
loadLines
Loads the entire stream into memory as a String and returns it. Notice: This implementation appends a \n as line terminator at the of the text. Warning, don't use for crazy big streams :)- Throws:
IOException
-
loadText
Loads the entire stream into memory as a String and returns it. Notice: This implementation appends a \n as line terminator at the of the text. Warning, don't use for crazy big streams :)- Throws:
IOException
-
matchWildcard
Matches the name with the pattern.- Parameters:
name- the namepattern- the pattern- Returns:
- true if matched, or false if not
-
isEmpty
Tests whether the value is null or an empty string.- Parameters:
value- the value, if its a String it will be tested for text length as well- Returns:
- true if empty
-
isNotEmpty
Tests whether the value is not null or an empty string.- Parameters:
value- the value, if its a String it will be tested for text length as well- Returns:
- true if not empty
-