Package org.jclouds.util
Class Strings2
java.lang.Object
org.jclouds.util.Strings2
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisCidrFormat(String in) static booleanisIPv6CIDR(String in) static StringreplaceTokens(String input, com.google.common.collect.Multimap<String, ?> tokenValues) static StringreplaceTokens(String input, Map<String, String> replacements) replaces tokens that are expressed as{token}static InputStreamtoInputStream(String in) static StringtoStringAndClose(InputStream input) static Stringurl decodes the input param, if set.static StringWeb browsers do not always handle '+' characters well, use the well-supported '%20' instead.static String 
- 
Constructor Details
- 
Strings2
public Strings2() 
 - 
 - 
Method Details
- 
urlEncode
Web browsers do not always handle '+' characters well, use the well-supported '%20' instead. - 
urlEncode
 - 
isCidrFormat
 - 
isIPv6CIDR
 - 
urlDecode
url decodes the input param, if set.- Parameters:
 in- nullable- Returns:
 - null if input was null
 - Throws:
 IllegalStateException- if encoding isn'tUTF-8
 - 
toStringAndClose
- Throws:
 IOException
 - 
toInputStream
 - 
replaceTokens
replaces tokens that are expressed as{token}ex. if input is "hello {where}"
and replacements is "where" -> "world"
then replaceTokens returns "hello world"- Parameters:
 input- source to replacereplacements- token/value pairs
 - 
replaceTokens
 
 -