|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jclouds.util.Strings2
public class Strings2
| Constructor Summary | |
|---|---|
Strings2()
|
|
| Method Summary | |
|---|---|
static boolean |
isCidrFormat(String in)
|
static boolean |
isUrlEncoded(String in)
|
static String |
replaceTokens(String input,
Map<String,String> replacements)
replaces tokens that are expressed as {token}
ex. |
static String |
replaceTokens(String input,
com.google.common.collect.Multimap<String,?> tokenValues)
|
static InputStream |
toInputStream(String in)
|
static String |
toString(com.google.common.io.InputSupplier<? extends InputStream> supplier)
Deprecated. use CharSource.read() instead |
static String |
toStringAndClose(InputStream input)
|
static String |
urlDecode(String in)
url decodes the input param, if set. |
static String |
urlEncode(String in,
char... skipEncode)
Web browsers do not always handle '+' characters well, use the well-supported '%20' instead. |
static String |
urlEncode(String in,
Iterable<Character> skipEncode)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Strings2()
| Method Detail |
|---|
public static String urlEncode(String in,
char... skipEncode)
public static String urlEncode(String in,
Iterable<Character> skipEncode)
public static boolean isCidrFormat(String in)
public static boolean isUrlEncoded(String in)
public static String urlDecode(@Nullable
String in)
in - nullable
IllegalStateException - if encoding isn't UTF-8
@Deprecated
public static String toString(com.google.common.io.InputSupplier<? extends InputStream> supplier)
throws IOException
IOException
public static String toStringAndClose(InputStream input)
throws IOException
IOExceptionpublic static InputStream toInputStream(String in)
public static String replaceTokens(String input,
Map<String,String> replacements)
{token}
ex. if input is "hello {where}"
input - source to replacereplacements - token/value pairs
public static String replaceTokens(String input,
com.google.common.collect.Multimap<String,?> tokenValues)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||