mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-24 17:30:46 +02:00
java: MessagePack.unpack(InputStream) throws IOException
This commit is contained in:
@@ -51,7 +51,7 @@ public class MessagePack {
|
|||||||
return out.toByteArray();
|
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);
|
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);
|
Unpacker pac = new Unpacker(in);
|
||||||
try {
|
return pac.unpackObject();
|
||||||
return pac.unpackObject();
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object unpack(InputStream in, Template tmpl) throws IOException, MessageTypeException {
|
public static Object unpack(InputStream in, Template tmpl) throws IOException, MessageTypeException {
|
||||||
|
|||||||
Reference in New Issue
Block a user