mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 17:59:52 +00:00
java: fixes compile error
This commit is contained in:
parent
b9cb270b8f
commit
b4fc79c38e
2 changed files with 16 additions and 3 deletions
|
|
@ -293,7 +293,7 @@ abstract class BufferedUnpackerImpl extends UnpackerImpl {
|
|||
return false;
|
||||
}
|
||||
advance(1);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
final boolean unpackBoolean() throws IOException, MessageTypeException {
|
||||
|
|
@ -396,6 +396,11 @@ abstract class BufferedUnpackerImpl extends UnpackerImpl {
|
|||
return bytes;
|
||||
}
|
||||
|
||||
final byte[] unpackByteArray() throws IOException, MessageTypeException {
|
||||
int length = unpackRaw();
|
||||
return unpackRawBody(length);
|
||||
}
|
||||
|
||||
final String unpackString() throws IOException, MessageTypeException {
|
||||
int length = unpackRaw();
|
||||
more(length);
|
||||
|
|
|
|||
|
|
@ -521,13 +521,21 @@ public class Unpacker implements Iterable<Object> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets one raw header from the buffer.
|
||||
* Gets one raw body from the buffer.
|
||||
* This method calls {@link fill()} method if needed.
|
||||
*/
|
||||
public byte[] unpackRawBody(int length) throws IOException {
|
||||
return impl.unpackRawBody(length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets one raw bytes from the buffer.
|
||||
* This method calls {@link fill()} method if needed.
|
||||
*/
|
||||
public byte[] unpackByteArray() throws IOException {
|
||||
return impl.unpackByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets one {@code String} value from the buffer.
|
||||
* This method calls {@link fill()} method if needed.
|
||||
|
|
@ -546,7 +554,7 @@ public class Unpacker implements Iterable<Object> {
|
|||
}
|
||||
|
||||
final void unpack(MessageUnpackable obj) throws IOException, MessageTypeException {
|
||||
obj.unpackMessage(this);
|
||||
obj.messageUnpack(this);
|
||||
}
|
||||
|
||||
final boolean tryUnpackNull() throws IOException {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue