public class Base64
extends java.lang.Object
Constructor and Description |
---|
Base64() |
Modifier and Type | Method and Description |
---|---|
static java.nio.ByteBuffer |
decode(java.lang.CharSequence input)
Takes a base64 encoded String and decodes it into a ByteBuffer.
|
static byte[] |
decodeToArray(java.lang.CharSequence input)
Takes a base64 encoded String and decodes it into a byte[].
|
static java.lang.StringBuffer |
encode(java.nio.ByteBuffer buffer)
Encodes a ByteBuffer in base64.
|
static java.lang.StringBuffer |
encode(java.nio.ByteBuffer input,
boolean wrap)
Encodes a ByteBuffer in base64 code.
|
static java.lang.StringBuffer |
encode(java.lang.String input)
Takes a String that is encoded in US-ASCII and converts it to base64.
|
public static java.nio.ByteBuffer decode(java.lang.CharSequence input)
input
- a base64 Stringpublic static byte[] decodeToArray(java.lang.CharSequence input)
input
- public static java.lang.StringBuffer encode(java.nio.ByteBuffer input, boolean wrap)
input
- the raw byteswrap
- wraps the output after 76 characters if truepublic static java.lang.StringBuffer encode(java.lang.String input)
encode(ByteBuffer)
after getting
the bytes from the string.input
- the us-ascii input stringpublic static java.lang.StringBuffer encode(java.nio.ByteBuffer buffer)
buffer
- encode(ByteBuffer, boolean)
Copyright © 2021. All Rights Reserved.