Skip to content

Commit

Permalink
formatting Base64Utils
Browse files Browse the repository at this point in the history
  • Loading branch information
spencergibb committed Aug 5, 2024
1 parent b59d266 commit 40808a3
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
/**
* A simple utility class for Base64 encoding and decoding.
*
* <p>Adapts to Java 8's {@link java.util.Base64} in a convenience fashion.
* <p>
* Adapts to Java 8's {@link java.util.Base64} in a convenience fashion.
*
* @author Juergen Hoeller
* @author Gary Russell
* @since 4.1
* @see java.util.Base64
* @deprecated as of Spring Framework 6.0.5 in favor of {@link Base64}; scheduled
* for removal in 6.2
* @deprecated as of Spring Framework 6.0.5 in favor of {@link Base64}; scheduled for
* removal in 6.2
*/
@Deprecated(since = "6.0.5", forRemoval = true)
public abstract class Base64Utils {
Expand Down Expand Up @@ -58,8 +59,8 @@ public static byte[] decode(byte[] src) {
}

/**
* Base64-encode the given byte array using the RFC 4648
* "URL and Filename Safe Alphabet".
* Base64-encode the given byte array using the RFC 4648 "URL and Filename Safe
* Alphabet".
* @param src the original byte array
* @return the encoded byte array
* @since 4.2.4
Expand All @@ -72,8 +73,8 @@ public static byte[] encodeUrlSafe(byte[] src) {
}

/**
* Base64-decode the given byte array using the RFC 4648
* "URL and Filename Safe Alphabet".
* Base64-decode the given byte array using the RFC 4648 "URL and Filename Safe
* Alphabet".
* @param src the encoded byte array
* @return the original byte array
* @since 4.2.4
Expand Down Expand Up @@ -110,8 +111,8 @@ public static byte[] decodeFromString(String src) {
}

/**
* Base64-encode the given byte array to a String using the RFC 4648
* "URL and Filename Safe Alphabet".
* Base64-encode the given byte array to a String using the RFC 4648 "URL and Filename
* Safe Alphabet".
* @param src the original byte array
* @return the encoded byte array as a UTF-8 String
*/
Expand All @@ -120,13 +121,13 @@ public static String encodeToUrlSafeString(byte[] src) {
}

/**
* Base64-decode the given byte array from a UTF-8 String using the RFC 4648
* "URL and Filename Safe Alphabet".
* Base64-decode the given byte array from a UTF-8 String using the RFC 4648 "URL and
* Filename Safe Alphabet".
* @param src the encoded UTF-8 String
* @return the original byte array
*/
public static byte[] decodeFromUrlSafeString(String src) {
return Base64.getUrlDecoder().decode(src);
}

}
}

0 comments on commit 40808a3

Please sign in to comment.