public class Base64Encoder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
encode(byte[] bytes)
Encode an array of bytes in base64.
|
static java.lang.String |
encode(java.lang.String s,
java.nio.charset.Charset charset)
Encode a string in base64, using charset as The string encoding.
|
static java.lang.String |
encode(java.lang.String s,
java.lang.String charsetName)
Encode a string in base64, using charsetName as The string encoding.
|
public static byte[] encode(byte[] bytes) throws java.io.IOException
bytes
- The array of bytes to decode.java.io.IOException
- Upon encoding error.public static java.lang.String encode(java.lang.String s, java.lang.String charsetName) throws java.io.IOException
s
- The string to encode.charsetName
- The encoding name.java.io.IOException
- Upon encoding error.public static java.lang.String encode(java.lang.String s, java.nio.charset.Charset charset) throws java.io.IOException
s
- The string to encode.charset
- The encoding charset.java.io.IOException
- Upon encoding error.Copyright © 2021 Dassault Systèmes, All Rights Reserved.