org.camunda.bpm.engine.impl.util
Class StringUtil

java.lang.Object
  extended by org.camunda.bpm.engine.impl.util.StringUtil

public final class StringUtil
extends Object

Author:
Sebastian Menski

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 isExpression(String text)
          Checks whether a String seams to be an expression or not
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

StringUtil

public StringUtil()
Method Detail

isExpression

public static boolean isExpression(String text)
Checks whether a String seams to be an expression or not

Parameters:
text - the text to check
Returns:
true if the text seams to be an expression false otherwise

split

public static String[] split(String text,
                             String regex)

hasAnySuffix

public static boolean hasAnySuffix(String text,
                                   String[] suffixes)

fromBytes

public static String fromBytes(byte[] bytes)
converts a byte array into a string using the current process engines default charset as returned by ProcessEngineConfigurationImpl.getDefaultCharset()

Parameters:
bytes - the byte array
Returns:
a string representing the bytes

fromBytes

public 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()

Parameters:
bytes - the byte array
processEngine - the process engine
Returns:
a string representing the bytes

readerFromBytes

public static Reader readerFromBytes(byte[] bytes)

writerForStream

public static Writer writerForStream(OutputStream outStream)

toByteArray

public static byte[] toByteArray(String string)
Gets the bytes from a string using the current process engine's default charset

Parameters:
string - the string to get the bytes form
Returns:
the byte array

toByteArray

public static byte[] toByteArray(String string,
                                 ProcessEngine processEngine)
Gets the bytes from a string using the provided process engine's default charset

Parameters:
string - the string to get the bytes form
processEngine - the process engine to use
Returns:
the byte array

joinDbEntityIds

public static String joinDbEntityIds(Collection<? extends DbEntity> dbEntities)

joinProcessElementInstanceIds

public static String joinProcessElementInstanceIds(Collection<? extends ProcessElementInstance> processElementInstances)

join

public static String join(Iterator<String> iterator)


Copyright © 2016 camunda services GmbH. All rights reserved.