|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.util.StringUtil
public final class StringUtil
| Nested Class Summary | |
|---|---|
static class |
StringUtil.StringIterator<T>
|
| Constructor Summary | |
|---|---|
StringUtil()
|
|
| Method Summary | |
|---|---|
static String |
fromBytes(byte[] bytes)
converts a byte array into a string using the current process engines default charset as returned by ProcessEngineConfigurationImpl.getDefaultCharset() |
static String |
fromBytes(byte[] bytes,
ProcessEngine processEngine)
converts a byte array into a string using the provided process engine's default charset as returned by ProcessEngineConfigurationImpl.getDefaultCharset() |
static boolean |
hasAnySuffix(String text,
String[] suffixes)
|
static boolean |
isCompositeExpression(String text,
ExpressionManager expressionManager)
Checks whether a String seams to be a composite expression or not. |
static boolean |
isExpression(String text)
Checks whether a String seams to be an expression or not
Note: In most cases you should check for composite expressions. |
static String |
join(Iterator<String> iterator)
|
static String |
joinDbEntityIds(Collection<? extends DbEntity> dbEntities)
|
static String |
joinProcessElementInstanceIds(Collection<? extends ProcessElementInstance> processElementInstances)
|
static Reader |
readerFromBytes(byte[] bytes)
|
static String[] |
split(String text,
String regex)
|
static byte[] |
toByteArray(String string)
Gets the bytes from a string using the current process engine's default charset |
static byte[] |
toByteArray(String string,
ProcessEngine processEngine)
Gets the bytes from a string using the provided process engine's default charset |
static Writer |
writerForStream(OutputStream outStream)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringUtil()
| Method Detail |
|---|
public static boolean isExpression(String text)
String seams to be an expression or not
Note: In most cases you should check for composite expressions. See
isCompositeExpression(String, ExpressionManager) for more information.
text - the text to check
public static boolean isCompositeExpression(String text,
ExpressionManager expressionManager)
String seams to be a composite expression or not. In contrast to an eval expression
is the composite expression also allowed to consist of a combination of literal and eval expressions, e.g.,
"Welcome ${customer.name} to our site".
Note: If you just want to allow eval expression, then the expression must always start with "#{" or "${".
Use isExpression(String) to conduct these kind of checks.
public static String[] split(String text,
String regex)
public static boolean hasAnySuffix(String text,
String[] suffixes)
public static String fromBytes(byte[] bytes)
ProcessEngineConfigurationImpl.getDefaultCharset()
bytes - the byte array
public static String fromBytes(byte[] bytes,
ProcessEngine processEngine)
ProcessEngineConfigurationImpl.getDefaultCharset()
bytes - the byte arrayprocessEngine - the process engine
public static Reader readerFromBytes(byte[] bytes)
public static Writer writerForStream(OutputStream outStream)
public static byte[] toByteArray(String string)
string - the string to get the bytes form
public static byte[] toByteArray(String string,
ProcessEngine processEngine)
string - the string to get the bytes formprocessEngine - the process engine to use
public static String joinDbEntityIds(Collection<? extends DbEntity> dbEntities)
public static String joinProcessElementInstanceIds(Collection<? extends ProcessElementInstance> processElementInstances)
public static String join(Iterator<String> iterator)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||