| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
decode(String str) |
static String |
decoder(String str) |
static String |
encode(String string)
Encode string as a byte array in Base64 annotation.
|
static String |
encodeBytes(byte[] source)
Encodes a byte array into Base64 notation.
|
static String |
encodeBytes(byte[] source,
int off,
int len)
Encodes a byte array into Base64 notation.
|
static byte[] |
encodeBytesToBytes(byte[] source,
int off,
int len)
Similar to
encodeBytes(byte[], int, int) but returns a byte
array instead of instantiating a String. |
public static String encode(String string)
string - public static String encodeBytes(byte[] source)
source - The data to convertNullPointerException - if source array is nullIllegalArgumentException - if source array, offset, or length are invalidpublic static String encodeBytes(byte[] source, int off, int len)
source - The data to convertoff - Offset in array where conversion should beginlen - Length of data to convertNullPointerException - if source array is nullIllegalArgumentException - if source array, offset, or length are invalidpublic static byte[] encodeBytesToBytes(byte[] source,
int off,
int len)
encodeBytes(byte[], int, int) but returns a byte
array instead of instantiating a String. This is more efficient if you're
working with I/O streams and have large data sets to encode.source - The data to convertoff - Offset in array where conversion should beginlen - Length of data to convertNullPointerException - if source array is nullIllegalArgumentException - if source array, offset, or length are invalidpublic static byte[] decode(String str) throws UnsupportedEncodingException
public static String decoder(String str) throws UnsupportedEncodingException
Copyright © 2016. All rights reserved.