Package cn.authing.internal
Class Base64
- java.lang.Object
-
- cn.authing.internal.Base64
-
public class Base64 extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBase64.DecoderThis class implements a decoder for decoding byte data using the Base64 encoding scheme as specified in RFC 4648 and RFC 2045.static classBase64.EncoderThis class implements an encoder for encoding byte data using the Base64 encoding scheme as specified in RFC 4648 and RFC 2045.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Base64.DecodergetDecoder()Returns aBase64.Decoderthat decodes using the Basic type base64 encoding scheme.static Base64.EncodergetEncoder()Returns aBase64.Encoderthat encodes using the Basic type base64 encoding scheme.static Base64.DecodergetMimeDecoder()Returns aBase64.Decoderthat decodes using the MIME type base64 decoding scheme.static Base64.EncodergetMimeEncoder()Returns aBase64.Encoderthat encodes using the MIME type base64 encoding scheme.static Base64.EncodergetMimeEncoder(int lineLength, byte[] lineSeparator)Returns aBase64.Encoderthat encodes using the MIME type base64 encoding scheme with specified line length and line separators.static Base64.DecodergetUrlDecoder()Returns aBase64.Decoderthat decodes using the URL and Filename safe type base64 encoding scheme.static Base64.EncodergetUrlEncoder()Returns aBase64.Encoderthat encodes using the URL and Filename safe type base64 encoding scheme.
-
-
-
Method Detail
-
getEncoder
public static Base64.Encoder getEncoder()
Returns aBase64.Encoderthat encodes using the Basic type base64 encoding scheme.- Returns:
- A Base64 encoder.
-
getUrlEncoder
public static Base64.Encoder getUrlEncoder()
Returns aBase64.Encoderthat encodes using the URL and Filename safe type base64 encoding scheme.- Returns:
- A Base64 encoder.
-
getMimeEncoder
public static Base64.Encoder getMimeEncoder()
Returns aBase64.Encoderthat encodes using the MIME type base64 encoding scheme.- Returns:
- A Base64 encoder.
-
getMimeEncoder
public static Base64.Encoder getMimeEncoder(int lineLength, byte[] lineSeparator)
Returns aBase64.Encoderthat encodes using the MIME type base64 encoding scheme with specified line length and line separators.- Parameters:
lineLength- the length of each output line (rounded down to nearest multiple of 4). IflineLength <= 0the output will not be separated in lineslineSeparator- the line separator for each output line- Returns:
- A Base64 encoder.
- Throws:
IllegalArgumentException- iflineSeparatorincludes any character of "The Base64 Alphabet" as specified in Table 1 of RFC 2045.
-
getDecoder
public static Base64.Decoder getDecoder()
Returns aBase64.Decoderthat decodes using the Basic type base64 encoding scheme.- Returns:
- A Base64 decoder.
-
getUrlDecoder
public static Base64.Decoder getUrlDecoder()
Returns aBase64.Decoderthat decodes using the URL and Filename safe type base64 encoding scheme.- Returns:
- A Base64 decoder.
-
getMimeDecoder
public static Base64.Decoder getMimeDecoder()
Returns aBase64.Decoderthat decodes using the MIME type base64 decoding scheme.- Returns:
- A Base64 decoder.
-
-