Class StringUtils
java.lang.Object
org.apache.qpid.protonj2.engine.util.StringUtils
Set of 
String utilities used in the proton code.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringtoQuotedString(ProtonBuffer buffer) Converts the ProtonBuffer to a quoted string using a default max length before truncation value and appends a truncation indication if the string required truncation.static StringtoQuotedString(ProtonBuffer buffer, boolean appendIfTruncated) Converts the ProtonBuffer to a quoted string using a default max length before truncation value.static StringtoQuotedString(ProtonBuffer buffer, int stringLength, boolean appendIfTruncated) Converts the ProtonBuffer to a quoted string.static StringtoQuotedString(Binary buffer) Converts the Binary to a quoted string using a default max length before truncation value and appends a truncation indication if the string required truncation.static StringtoQuotedString(Binary buffer, boolean appendIfTruncated) Converts the Binary to a quoted string using a default max length before truncation value.static StringtoQuotedString(Binary buffer, int stringLength, boolean appendIfTruncated) Converts the Binary to a quoted string.static String[]toStringArray(Symbol[] symbolArray) Converts the given Symbol[] into a String[] array.toStringKeyedMap(Map<Symbol, Object> symbolMap) toStringSet(Symbol[] symbols) Converts the given Symbol array into a matching StringSet.static Symbol[]toSymbolArray(String[] stringArray) Converts the given String[] into a Symbol[] array.static Symbol[]toSymbolArray(Collection<String> stringsSet) Converts the given StringCollectioninto a Symbol array.toSymbolKeyedMap(Map<String, Object> stringsMap) toSymbolSet(Collection<String> stringsSet) Converts the given StringCollectioninto a matching SymbolSet.
- 
Constructor Details- 
StringUtilspublic StringUtils()
 
- 
- 
Method Details- 
toSymbolArrayConverts the given String[] into a Symbol[] array.- Parameters:
- stringArray- The given String[] to convert.
- Returns:
- a new Symbol array that contains Symbol versions of the input Strings.
 
- 
toStringArrayConverts the given Symbol[] into a String[] array.- Parameters:
- symbolArray- The given Symbol[] to convert.
- Returns:
- a new String array that contains String versions of the input Symbol.
 
- 
toSymbolKeyedMap
- 
toStringKeyedMap
- 
toSymbolArrayConverts the given StringCollectioninto a Symbol array.- Parameters:
- stringsSet- The given String- Collectionto convert.
- Returns:
- a new Symbol array that contains String versions of the input Symbols.
 
- 
toSymbolSetConverts the given StringCollectioninto a matching SymbolSet.- Parameters:
- stringsSet- The given String- Collectionto convert.
- Returns:
- a new Symbol Setthat contains String versions of the input Symbols.
 
- 
toStringSetConverts the given Symbol array into a matching StringSet.- Parameters:
- symbols- The given Symbol array to convert.
- Returns:
- a new String Setthat contains String versions of the input Symbols.
 
- 
toQuotedStringConverts the Binary to a quoted string using a default max length before truncation value and appends a truncation indication if the string required truncation.- Parameters:
- buffer- the- Binaryto convert into String format.
- Returns:
- the converted string
 
- 
toQuotedStringConverts the Binary to a quoted string using a default max length before truncation value.- Parameters:
- buffer- the- Binaryto convert into String format.
- appendIfTruncated- appends "...(truncated)" if not all of the payload is present in the string
- Returns:
- the converted string
 
- 
toQuotedStringConverts the Binary to a quoted string.- Parameters:
- buffer- the- Binaryto convert into String format.
- stringLength- the maximum length of stringified content (excluding the quotes, and truncated indicator)
- appendIfTruncated- appends "...(truncated)" if not all of the payload is present in the string
- Returns:
- the converted string
 
- 
toQuotedStringConverts the ProtonBuffer to a quoted string using a default max length before truncation value and appends a truncation indication if the string required truncation.- Parameters:
- buffer- the- ProtonBufferto convert into String format.
- Returns:
- the converted string
 
- 
toQuotedStringConverts the ProtonBuffer to a quoted string using a default max length before truncation value.- Parameters:
- buffer- the- ProtonBufferto convert into String format.
- appendIfTruncated- appends "...(truncated)" if not all of the payload is present in the string
- Returns:
- the converted string
 
- 
toQuotedStringpublic static String toQuotedString(ProtonBuffer buffer, int stringLength, boolean appendIfTruncated) Converts the ProtonBuffer to a quoted string.- Parameters:
- buffer- the- ProtonBufferto convert into String format.
- stringLength- the maximum length of stringified content (excluding the quotes, and truncated indicator)
- appendIfTruncated- appends "...(truncated)" if not all of the payload is present in the string
- Returns:
- the converted string
 
 
-