| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.util.EncodingUtils
public final class EncodingUtils
The home for utility methods that handle various encoding tasks.
| Method Summary | |
|---|---|
| static byte[] | getAsciiBytes(String data)Converts the specified string to byte array of ASCII characters. | 
| static String | getAsciiString(byte[] data)Converts the byte array of ASCII characters to a string. | 
| static String | getAsciiString(byte[] data,
               int offset,
               int length)Converts the byte array of ASCII characters to a string. | 
| static byte[] | getBytes(String data,
         String charset)Converts the specified string to a byte array. | 
| static String | getString(byte[] data,
          int offset,
          int length,
          String charset)Converts the byte array of HTTP content characters to a string. | 
| static String | getString(byte[] data,
          String charset)Converts the byte array of HTTP content characters to a string. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static String getString(byte[] data,
                               int offset,
                               int length,
                               String charset)
data - the byte array to be encodedoffset - the index of the first byte to encodelength - the number of bytes to encodecharset - the desired character encoding
public static String getString(byte[] data,
                               String charset)
data - the byte array to be encodedcharset - the desired character encoding
public static byte[] getBytes(String data,
                              String charset)
data - the string to be encodedcharset - the desired character encoding
public static byte[] getAsciiBytes(String data)
data - the string to be encoded
public static String getAsciiString(byte[] data,
                                    int offset,
                                    int length)
data - the byte array to be encodedoffset - the index of the first byte to encodelength - the number of bytes to encode
public static String getAsciiString(byte[] data)
data - the byte array to be encoded
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||