@Internal public class Base64 extends Object
Only the features currently used by HttpClient are implemented here rather than all the features of Commons Codec.
Notes:
| Constructor and Description | 
|---|
| Base64()Return an instance of the Base64 codec that use the regular Base64 alphabet
 (as opposed to the URL-safe alphabet). | 
| Base64(int lineLength)Creates a Base64 codec used for decoding and encoding in URL-unsafe mode. | 
| Modifier and Type | Method and Description | 
|---|---|
| byte[] | decode(byte[] base64)Decode Base64-encoded bytes to their original form, using specifications from this codec instance | 
| byte[] | decode(String base64)Decode a Base64 String to its original form, using specifications from this codec instance | 
| static byte[] | decodeBase64(byte[] base64)Decodes Base64 data into octets. | 
| static byte[] | decodeBase64(String base64)Decodes a Base64 String into octets. | 
| byte[] | encode(byte[] value)Encode bytes to their Base64 form, using specifications from this codec instance | 
| static byte[] | encodeBase64(byte[] base64)Encodes binary data using the base64 algorithm but does not chunk the output. | 
| static String | encodeBase64String(byte[] bytes)Encodes binary data using the base64 algorithm but does not chunk the output. | 
public Base64()
public Base64(int lineLength)
As HttpClient never uses a non-zero length, this feature is not implemented here.
public static byte[] decodeBase64(byte[] base64)
Note: this method does NOT accept URL-safe encodings
public static byte[] decodeBase64(String base64)
Note: this method does NOT accept URL-safe encodings
public static byte[] encodeBase64(byte[] base64)
public static String encodeBase64String(byte[] bytes)
public byte[] decode(byte[] base64)
public byte[] decode(String base64)
public byte[] encode(byte[] value)
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.