public final class StringUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
base64ToHex(String value)
Convert base64 value to hex.
|
static String |
base64ToUrl(String value)
Encode EWS base64 itemId to url compatible value.
|
static String |
convertZuluDateTimeToAllDay(String value)
Get allday date value from zulu timestamp.
|
static String |
davSearchEncode(String value)
Encode quotes in Dav search parameter.
|
static String |
decodeUrlcompname(String urlcompname)
Decode urlcompname to get item name.
|
static String |
encodePlusSign(String value)
Urlencode plus sign in encoded href.
|
static String |
encodeUrlcompname(String value)
Encode item name to get actual value stored in urlcompname MAPI property.
|
static String |
getLastToken(String value,
String startDelimiter,
String endDelimiter)
Return the sub string between startDelimiter and endDelimiter or null,
look for last token in string.
|
static String |
getToken(String value,
String startDelimiter,
String endDelimiter)
Return the sub string between startDelimiter and endDelimiter or null.
|
static String |
hexToBase64(String value)
Convert hex value to base64.
|
static String |
join(Set<String> values,
String separator)
Join values with given separator.
|
static String |
removeQuotes(String value)
Remove quotes if present on value.
|
static String |
replaceToken(String value,
String startDelimiter,
String endDelimiter,
String newToken)
Return the sub string between startDelimiter and endDelimiter with newToken.
|
static String |
urlToBase64(String value)
Encode EWS url compatible itemId back to base64 value.
|
static String |
xmlDecode(String name)
Need to decode xml for iCal
|
static String |
xmlEncode(String name)
Xml encode content.
|
static String |
xmlEncodeAttribute(String name)
Xml encode inside attribute.
|
public static String getToken(String value, String startDelimiter, String endDelimiter)
value
- String valuestartDelimiter
- start delimiterendDelimiter
- end delimiterpublic static String getLastToken(String value, String startDelimiter, String endDelimiter)
value
- String valuestartDelimiter
- start delimiterendDelimiter
- end delimiterpublic static String replaceToken(String value, String startDelimiter, String endDelimiter, String newToken)
value
- String valuestartDelimiter
- start delimiterendDelimiter
- end delimiternewToken
- new token valuepublic static String join(Set<String> values, String separator)
values
- value setseparator
- separatorpublic static String xmlEncode(String name)
name
- decoded namepublic static String xmlEncodeAttribute(String name)
name
- decoded namepublic static String xmlDecode(String name)
name
- encoded namepublic static String base64ToHex(String value)
value
- base64 valuepublic static String hexToBase64(String value) throws org.apache.commons.codec.DecoderException
value
- hex valueorg.apache.commons.codec.DecoderException
- on errorpublic static String encodeUrlcompname(String value)
value
- decoded valuepublic static String decodeUrlcompname(String urlcompname)
urlcompname
- encoded valuepublic static String encodePlusSign(String value)
value
- encoded hrefpublic static String base64ToUrl(String value)
value
- base64 valuepublic static String urlToBase64(String value)
value
- url compatible valuepublic static String davSearchEncode(String value)
value
- search parameterpublic static String convertZuluDateTimeToAllDay(String value)
value
- zulu datetimeCopyright © 2001–2024 MickaĆ«l Guessant. All rights reserved.