java: MessagePack.unpack(InputStream) throws IOException

This commit is contained in:
frsyuki 2010-11-09 02:57:49 +09:00
parent 33b43d03ac
commit d8e2d1725a

View File

@ -51,7 +51,7 @@ public class MessagePack {
return out.toByteArray();
}
public static void pack(OutputStream out, Object obj, Template tmpl) throws IOException {
public static void pack(OutputStream out, Object obj, Template tmpl) throws IOException, MessageTypeException {
new Packer(out).pack(obj, tmpl);
}
@ -86,13 +86,9 @@ public class MessagePack {
}
}
public static MessagePackObject unpack(InputStream in) {
public static MessagePackObject unpack(InputStream in) throws IOException {
Unpacker pac = new Unpacker(in);
try {
return pac.unpackObject();
} catch (IOException e) {
throw new RuntimeException(e);
}
return pac.unpackObject();
}
public static Object unpack(InputStream in, Template tmpl) throws IOException, MessageTypeException {