public final class EncodeUtils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
decode(byte[] byteArray) |
static String |
decode(byte[] byteArray,
String charsetName) |
static String |
decode(ByteBuffer buffer) |
static String |
decode(ByteBuffer buffer,
String charsetName) |
static String |
decode(CharBuffer buffer) |
static String |
decode(CharBuffer buffer,
String charsetName) |
static String |
decode(String str) |
static String |
decode(String str,
String charsetName) |
static ByteBuffer |
encode(byte[] byteArray)
byte[] to ByteBuffer by UTF-8 encode
|
static ByteBuffer |
encode(CharBuffer buffer)
CharBuffer to ByteBuffer by UTF-8 encode
|
static ByteBuffer |
encode(CharBuffer buffer,
String charsetName)
CharBuffer to ByteBuffer by charsetName encode
|
static ByteBuffer |
encode(String str) |
static ByteBuffer |
encode(String str,
String charsetName) |
static byte[] |
encodeByte(ByteBuffer buffer) |
static Charset |
getDefaultCharset() |
static Charset |
getUTFCharset() |
public static String decode(ByteBuffer buffer, String charsetName)
public static String decode(ByteBuffer buffer)
public static String decode(CharBuffer buffer)
public static String decode(CharBuffer buffer, String charsetName)
public static String decode(byte[] byteArray)
public static ByteBuffer encode(String str)
public static ByteBuffer encode(String str, String charsetName)
public static ByteBuffer encode(CharBuffer buffer)
buffer - CharBuffer typepublic static ByteBuffer encode(CharBuffer buffer, String charsetName)
buffer - CharBuffer typecharsetName - encode namepublic static ByteBuffer encode(byte[] byteArray)
byteArray - byte[] typepublic static byte[] encodeByte(ByteBuffer buffer)
public static Charset getUTFCharset()
public static Charset getDefaultCharset()
Copyright © 2016. All rights reserved.