Module java.base
Package java.util

Class Base64.Decoder

java.lang.Object
java.util.Base64.Decoder
Enclosing class:
Base64

public static class Base64.Decoder extends Object
This class implements a decoder for decoding byte data using the Base64 encoding scheme as specified in RFC 4648 and RFC 2045.

The Base64 padding character '=' is accepted and interpreted as the end of the encoded byte data, but is not required. So if the final unit of the encoded byte data only has two or three Base64 characters (without the corresponding padding character(s) padded), they are decoded as if followed by padding character(s). If there is a padding character present in the final unit, the correct number of padding character(s) must be present, otherwise IllegalArgumentException ( IOException when reading from a Base64 stream) is thrown during decoding.

Instances of Base64.Decoder class are safe for use by multiple concurrent threads.

Unless otherwise noted, passing a null argument to a method of this class will cause a NullPointerException to be thrown.

If the decoded byte output of the needed size can not be allocated, the decode methods of this class will cause an OutOfMemoryError to be thrown.

Since:
1.8
See Also: