public class base64 extends Object
Modifier and Type | Method and Description |
---|---|
static String |
formatString(byte[] b,
int lineLength,
String prefix,
boolean addClose)
Formats data into a nicely formatted base64 encoded String
|
static byte[] |
fromString(String str)
Convert a base64-encoded String to binary data
|
static String |
toString(byte[] b)
Convert binary data to a base64-encoded String
|
static String |
toString(byte[] b,
boolean useUrl)
Convert binary data to a base64-encoded String
|
public static String toString(byte[] b)
b
- An array containing binary datapublic static String toString(byte[] b, boolean useUrl)
b
- An array containing binary datauseUrl
- True to use Base64URL encoding (i.e. no trailing =, -_ instead of +/)public static String formatString(byte[] b, int lineLength, String prefix, boolean addClose)
b
- An array containing binary datalineLength
- The number of characters per lineprefix
- A string prefixing the characters on each lineaddClose
- Whether to add a close parenthesis or notpublic static byte[] fromString(String str)
str
- A String containing the encoded dataCopyright © 2022 dnsjava.org. All rights reserved.