Version 4.5.0
[nikiroo-utils.git] / src / be / nikiroo / utils / serial / Importer.java
index e7285c42ca329c7a6e84c73fba0189c228493781..84fb5aae5742f49bcf68cd915906a2b7322a399b 100644 (file)
@@ -70,13 +70,22 @@ public class Importer {
 
                                if (line.startsWith("ZIP:")) {
                                        try {
-                                               line = StringUtils.unzip64(line.substring("ZIP:"
-                                                               .length()));
+                                               line = StringUtils.unbase64s(
+                                                               line.substring("ZIP:".length()), true);
                                        } catch (IOException e) {
                                                throw new IOException(
                                                                "Internal error when decoding ZIP content: input may be corrupt");
                                        }
                                        read(line);
+                               } else if (line.startsWith("B64:")) {
+                                       try {
+                                               line = StringUtils.unbase64s(
+                                                               line.substring("B64:".length()), false);
+                                       } catch (IOException e) {
+                                               throw new IOException(
+                                                               "Internal error when decoding B64 content: input may be corrupt");
+                                       }
+                                       read(line);
                                } else {
                                        processLine(line);
                                }