git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'subtree'
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
utils
/
streams
/
Base64.java
diff --git
a/src/be/nikiroo/utils/streams/Base64.java
b/src/be/nikiroo/utils/streams/Base64.java
index 76b4be49f731e9b2ee1387b0a3190fe9555dbd34..d54794b0a4ee2284bb1c691cb329aa52dd65fb47 100644
(file)
--- a/
src/be/nikiroo/utils/streams/Base64.java
+++ b/
src/be/nikiroo/utils/streams/Base64.java
@@
-23,6
+23,8
@@
package be.nikiroo.utils.streams;
import java.io.UnsupportedEncodingException;
import java.io.UnsupportedEncodingException;
+import be.nikiroo.utils.StringUtils;
+
/**
* Utilities for encoding and decoding the Base64 representation of
* binary data. See RFCs <a
/**
* Utilities for encoding and decoding the Base64 representation of
* binary data. See RFCs <a
@@
-120,12
+122,7
@@
class Base64 {
* incorrect padding
*/
public static byte[] decode(String str, int flags) {
* incorrect padding
*/
public static byte[] decode(String str, int flags) {
- try{
- return decode(str.getBytes("UTF-8"), flags);
- } catch (UnsupportedEncodingException e) {
- // All conforming JVM are expected to support UTF-8
- return null;
- }
+ return decode(StringUtils.getBytes(str), flags);
}
/**
}
/**