Package org.springframework.util
Class Base64Utils
java.lang.Object
org.springframework.util.Base64Utils
Deprecated, for removal: This API element is subject to removal in a future version.
A simple utility class for Base64 encoding and decoding.
 
Adapts to Java 8's Base64 in a convenience fashion.
- Since:
- 4.1
- Author:
- Juergen Hoeller, Gary Russell
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionstatic byte[]decode(byte[] src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-decode the given byte array.static byte[]decodeFromString(String src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-decode the given byte array from a UTF-8 String.static byte[]Deprecated, for removal: This API element is subject to removal in a future version.Base64-decode the given byte array from a UTF-8 String using the RFC 4648 "URL and Filename Safe Alphabet".static byte[]decodeUrlSafe(byte[] src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-decode the given byte array using the RFC 4648 "URL and Filename Safe Alphabet".static byte[]encode(byte[] src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-encode the given byte array.static StringencodeToString(byte[] src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-encode the given byte array to a String.static StringencodeToUrlSafeString(byte[] src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-encode the given byte array to a String using the RFC 4648 "URL and Filename Safe Alphabet".static byte[]encodeUrlSafe(byte[] src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-encode the given byte array using the RFC 4648 "URL and Filename Safe Alphabet".
- 
Constructor Details- 
Base64Utilspublic Base64Utils()Deprecated, for removal: This API element is subject to removal in a future version.
 
- 
- 
Method Details- 
encodepublic static byte[] encode(byte[] src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-encode the given byte array.- Parameters:
- src- the original byte array
- Returns:
- the encoded byte array
 
- 
decodepublic static byte[] decode(byte[] src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-decode the given byte array.- Parameters:
- src- the encoded byte array
- Returns:
- the original byte array
 
- 
encodeUrlSafepublic static byte[] encodeUrlSafe(byte[] src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-encode the given byte array using the RFC 4648 "URL and Filename Safe Alphabet".- Parameters:
- src- the original byte array
- Returns:
- the encoded byte array
- Since:
- 4.2.4
 
- 
decodeUrlSafepublic static byte[] decodeUrlSafe(byte[] src) Deprecated, for removal: This API element is subject to removal in a future version.Base64-decode the given byte array using the RFC 4648 "URL and Filename Safe Alphabet".- Parameters:
- src- the encoded byte array
- Returns:
- the original byte array
- Since:
- 4.2.4
 
- 
encodeToStringDeprecated, for removal: This API element is subject to removal in a future version.Base64-encode the given byte array to a String.- Parameters:
- src- the original byte array
- Returns:
- the encoded byte array as a UTF-8 String
 
- 
decodeFromStringDeprecated, for removal: This API element is subject to removal in a future version.Base64-decode the given byte array from a UTF-8 String.- Parameters:
- src- the encoded UTF-8 String
- Returns:
- the original byte array
 
- 
encodeToUrlSafeStringDeprecated, for removal: This API element is subject to removal in a future version.Base64-encode the given byte array to a String using the RFC 4648 "URL and Filename Safe Alphabet".- Parameters:
- src- the original byte array
- Returns:
- the encoded byte array as a UTF-8 String
 
- 
decodeFromUrlSafeStringDeprecated, for removal: This API element is subject to removal in a future version.Base64-decode the given byte array from a UTF-8 String using the RFC 4648 "URL and Filename Safe Alphabet".- Parameters:
- src- the encoded UTF-8 String
- Returns:
- the original byte array
 
 
- 
Base64; scheduled for removal in 6.2