X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fserial%2FCustomSerializer.java;h=0bafb86f65152755ca7684614622af34e7aec449;hb=452f38c8b9e98215f4ed6def6f3f8fd5dfa75daa;hp=fa03f02e141c5056df9ad8bc89f9d59937500a74;hpb=8537d55a7dacf9f528ea9453b03d2391ea348846;p=nikiroo-utils.git diff --git a/src/be/nikiroo/utils/serial/CustomSerializer.java b/src/be/nikiroo/utils/serial/CustomSerializer.java index fa03f02..0bafb86 100644 --- a/src/be/nikiroo/utils/serial/CustomSerializer.java +++ b/src/be/nikiroo/utils/serial/CustomSerializer.java @@ -1,10 +1,12 @@ package be.nikiroo.utils.serial; +import java.io.IOException; + public abstract class CustomSerializer { protected abstract String toString(Object value); - protected abstract Object fromString(String content); + protected abstract Object fromString(String content) throws IOException; protected abstract String getType(); @@ -30,7 +32,7 @@ public abstract class CustomSerializer { return true; } - public Object decode(String encodedValue) { + public Object decode(String encodedValue) throws IOException { return fromString((String) SerialUtils.decode(contentOf(encodedValue))); }