Class Base64Decoder
java.lang.Object
org.miaixz.bus.core.codec.binary.decoder.Base64Decoder
- All Implemented Interfaces:
Serializable,Decoder<byte[],byte[]>
Base64解码实现
此解码保留的原因是,JDK提供的解码需要指定是否为URL安全的或是否换行,此解码无需区分
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decode(byte[] in) 解码Base64byte[]decode(byte[] in, int pos, int length) 解码Base64booleanisBase64Code(byte octet) 给定的字符是否为Base64字符
-
Field Details
-
INSTANCE
单例对象
-
-
Constructor Details
-
Base64Decoder
public Base64Decoder()
-
-
Method Details
-
decode
public byte[] decode(byte[] in) 解码Base64 -
decode
public byte[] decode(byte[] in, int pos, int length) 解码Base64- Parameters:
in- 输入pos- 开始位置length- 长度- Returns:
- 解码后的bytes
-
isBase64Code
public boolean isBase64Code(byte octet) 给定的字符是否为Base64字符- Parameters:
octet- 被检查的字符- Returns:
- 是否为Base64字符
-