mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 10:19:51 +00:00
java: MessagePack.unpack(InputStream) throws IOException
This commit is contained in:
parent
33b43d03ac
commit
d8e2d1725a
1 changed files with 3 additions and 7 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue