import be.nikiroo.utils.IOUtils;
import be.nikiroo.utils.Image;
-import be.nikiroo.utils.NextableInputStream;
-import be.nikiroo.utils.NextableInputStreamStep;
+import be.nikiroo.utils.streams.NextableInputStream;
+import be.nikiroo.utils.streams.NextableInputStreamStep;
import be.nikiroo.utils.StringUtils;
/**
type = type.substring(0, type.length() - 2); // remove the []
write(out, type);
- write(out, "\n");
+ write(out, "\r");
try {
for (int i = 0; true; i++) {
Object item = Array.get(value, i);
// encode it normally if direct value
if (!SerialUtils.encode(out, item)) {
try {
- // TODO: use ZIP: if not?
- new Exporter(out).append(item);
+ // TODO: bad escaping?
+ write(out, "B64:");
+ OutputStream bout = StringUtils.base64(out,
+ false, false);
+ new Exporter(bout).append(item);
} catch (NotSerializableException e) {
throw new UnknownFormatConversionException(e
.getMessage());
}
}
- write(out, "\n");
+ write(out, "\r");
}
} catch (ArrayIndexOutOfBoundsException e) {
// Done.
@Override
protected Object fromStream(InputStream in) throws IOException {
NextableInputStream stream = new NextableInputStream(in,
- new NextableInputStreamStep('\n'));
+ new NextableInputStreamStep('\r'));
try {
List<Object> list = new ArrayList<Object>();
// URL:
customTypes.put("java.net.URL", new CustomSerializer() {
-
@Override
protected void toStream(OutputStream out, Object value)
throws IOException {