public class Base64 extends Object
RFC4648_URLSAFE, UTF8 and no pad by default. This array is a lookup table that translates 6-bit positive integer index values into their "Base64 Alphabet" equivalents as specified in "Table 1: The Base64 Alphabet" of RFC 2045 (and RFC 4648). 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' It's the lookup table for "URL and Filename safe Base64" as specified in Table 2 of the RFC 4648, with the '+' and '/' changed to '-' and '_'. This table is used when BASE64_URL is specified. 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_'
Base64| Constructor and Description |
|---|
Base64() |
| Modifier and Type | Method and Description |
|---|---|
static @NotNull String |
de2str(byte[] bytes) |
static @NotNull String |
de2str(@Nullable InputStream ins) |
static @NotNull String |
de2str(@Nullable String str) |
static byte[] |
decode(byte[] bytes) |
static byte[] |
decode(@Nullable InputStream ins) |
static byte[] |
decode(@Nullable String str) |
static @NotNull String |
encode(byte[] bytes) |
static @NotNull String |
encode(byte[] bytes,
boolean urlSafe) |
static @NotNull String |
encode(@Nullable InputStream ins) |
static @NotNull String |
encode(@Nullable InputStream ins,
boolean urlSafe) |
static @NotNull String |
encode(@Nullable String str) |
static @NotNull String |
encode(@Nullable String str,
boolean urlSafe) |
static Base64.Encoder |
getEncoder(boolean urlSafe) |
static Base64.Encoder |
getEncoder(boolean urlSafe,
boolean noPad) |
static String |
pad(String b64) |
public static Base64.Encoder getEncoder(boolean urlSafe)
public static Base64.Encoder getEncoder(boolean urlSafe, boolean noPad)
@NotNull public static @NotNull String encode(@Nullable @Nullable InputStream ins)
@NotNull public static @NotNull String encode(byte[] bytes)
@NotNull public static @NotNull String encode(@Nullable @Nullable String str, boolean urlSafe)
@NotNull public static @NotNull String encode(@Nullable @Nullable InputStream ins, boolean urlSafe)
@NotNull public static @NotNull String encode(byte[] bytes, boolean urlSafe)
@NotNull public static @NotNull String de2str(byte[] bytes)
@NotNull public static @NotNull String de2str(@Nullable @Nullable InputStream ins)
public static byte[] decode(@Nullable
@Nullable String str)
public static byte[] decode(byte[] bytes)
public static byte[] decode(@Nullable
@Nullable InputStream ins)
Copyright © 2024. All rights reserved.