X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fserial%2FSerialUtils.java;h=be18769ee06967cd5c5a78439fcfe2afccb27d50;hp=c28faeddebd86cd783e4924460aa01cb749f4b83;hb=b771aed5070864bbcbae286c8de74478f6837618;hpb=632cc690ac07130a51a947ee0f0b2bfae10b6595 diff --git a/src/be/nikiroo/utils/serial/SerialUtils.java b/src/be/nikiroo/utils/serial/SerialUtils.java index c28faed..be18769 100644 --- a/src/be/nikiroo/utils/serial/SerialUtils.java +++ b/src/be/nikiroo/utils/serial/SerialUtils.java @@ -11,7 +11,7 @@ import java.util.HashMap; import java.util.Map; import java.util.UnknownFormatConversionException; -import be.nikiroo.utils.StringUtils; +import be.nikiroo.utils.ImageUtils; /** * Small class to help with serialisation. @@ -88,7 +88,7 @@ public class SerialUtils { @Override protected String toString(Object value) { try { - return StringUtils.fromImage((BufferedImage) value); + return ImageUtils.toBase64((BufferedImage) value); } catch (IOException e) { throw new UnknownFormatConversionException(e.getMessage()); } @@ -102,7 +102,7 @@ public class SerialUtils { @Override protected Object fromString(String content) { try { - return StringUtils.toImage(content); + return ImageUtils.fromBase64(content); } catch (IOException e) { throw new UnknownFormatConversionException(e.getMessage()); }