|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.util.Strings
public class Strings
Utilities for strings.
| Field Summary | |
|---|---|
static String |
LINE_SEPARATOR
Line separator to use for this OS, i.e. |
static String |
VERSION
Current version of the Google API Client Library for Java. |
| Method Summary | |
|---|---|
static String |
fromBytesUtf8(byte[] bytes)
Returns a new String by decoding the specified array of bytes using the "UTF-8"
charset. |
static byte[] |
toBytesUtf8(String string)
Returns a new byte array that is the result of encoding the given string into a sequence of bytes using the "UTF-8" charset. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VERSION
public static final String LINE_SEPARATOR
"\n" or "\r\n".
| Method Detail |
|---|
public static byte[] toBytesUtf8(String string)
"UTF-8" charset.
string - given string
public static String fromBytesUtf8(byte[] bytes)
String by decoding the specified array of bytes using the "UTF-8"
charset.
The length of the new String is a function of the charset, and hence may not be equal
to the length of the byte array.
bytes - bytes to be decoded into characters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||