backport to JDK 1.6
[nikiroo-utils.git] / src / jexer / tterminal / ECMA48.java
index bef9cabad620b705ec0c99e1d31182b5c3fa717a..5ff3518f3e3fb29785d55580e9377ba2855bb1fe 100644 (file)
@@ -7111,8 +7111,7 @@ public class ECMA48 implements Runnable {
             return;
         }
 
-        java.util.Base64.Decoder base64 = java.util.Base64.getDecoder();
-        byte [] bytes = base64.decode(data);
+        byte [] bytes = StringUtils.fromBase64(data.getBytes());
         if (bytes.length != (imageWidth * imageHeight * 3)) {
             return;
         }
@@ -7158,8 +7157,7 @@ public class ECMA48 implements Runnable {
         boolean scroll = false;
         BufferedImage image = null;
         try {
-            java.util.Base64.Decoder base64 = java.util.Base64.getDecoder();
-            byte [] bytes = base64.decode(data);
+            byte [] bytes = StringUtils.fromBase64(data.getBytes());
 
             switch (type) {
             case 1: