- if (line.startsWith("ZIP:")) {
- try {
- 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:")) {
+ while (stream.next()) {
+ boolean zip = stream.startsWiths("ZIP:");
+ boolean b64 = stream.startsWiths("B64:");
+
+ if (zip || b64) {
+ stream.skip("XXX:".length());
+ InputStream decoded = StringUtils.unbase64(stream.open(),
+ zip);