Skip to content
Permalink
Browse files
hessian
  • Loading branch information
haiyang1985 committed Mar 12, 2020
1 parent 6d11247 commit 7eba99cbffdcf6faf847a3cdacdd375c1e3740ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
@@ -21,7 +21,7 @@
<groupId>com.alibaba</groupId>
<artifactId>hessian-lite</artifactId>
<packaging>jar</packaging>
<version>3.2.5-SNAPSHOT</version>
<version>3.2.7-SNAPSHOT</version>
<name>Hessian Lite(Alibaba embed version)</name>

<properties>
@@ -3360,8 +3360,8 @@ public InputStream readInputStream()
case 'N':
return null;

case 'B':
case 'b':
case BC_BINARY:
case BC_BINARY_CHUNK:
_isLastChunk = tag == 'B';
_chunkLength = (read() << 8) + read();
break;
@@ -3385,7 +3385,10 @@ public InputStream readInputStream()
_isLastChunk = true;
_chunkLength = tag - 0x20;
break;

case 0x34: case 0x35: case 0x36: case 0x37:
_isLastChunk = true;
_chunkLength = (tag - 0x34) * 256 + read();
break;
default:
throw expect("binary", tag);
}
@@ -3408,13 +3411,13 @@ int read(byte[] buffer, int offset, int length)
int code = read();

switch (code) {
case 'b':
case BC_BINARY_CHUNK:
_isLastChunk = false;

_chunkLength = (read() << 8) + read();
break;

case 'B':
case BC_BINARY:
_isLastChunk = true;

_chunkLength = (read() << 8) + read();
@@ -3439,7 +3442,10 @@ int read(byte[] buffer, int offset, int length)
_isLastChunk = true;
_chunkLength = code - 0x20;
break;

case 0x34: case 0x35: case 0x36: case 0x37:
_isLastChunk = true;
_chunkLength = (code - 0x34) * 256 + read();
break;
default:
throw expect("byte[]", code);
}

0 comments on commit 7eba99c

Please sign in to comment.