Package com.amazonaws.util
Enum Base64
- All Implemented Interfaces:
Serializable
,Comparable<Base64>
,java.lang.constant.Constable
A Base 64 codec API.
See http://www.ietf.org/rfc/rfc4648.txt
- Author:
- Hanson Char
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
decode
(byte[] b64) Decodes the given base 64 encoded bytes.static byte[]
Decodes the given base 64 encoded string, skipping carriage returns, line feeds and spaces as needed.static byte[]
encode
(byte[] bytes) Returns a 64 encoded byte array of the given bytes.static String
encodeAsString
(byte... bytes) Returns a base 64 encoded string of the given bytes.static Base64
Returns the enum constant of this type with the specified name.static Base64[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
encodeAsString
Returns a base 64 encoded string of the given bytes. -
encode
public static byte[] encode(byte[] bytes) Returns a 64 encoded byte array of the given bytes. -
decode
Decodes the given base 64 encoded string, skipping carriage returns, line feeds and spaces as needed. -
decode
public static byte[] decode(byte[] b64) Decodes the given base 64 encoded bytes.
-