Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ting-client into fireflies-xlt-master
  • Loading branch information
spencergibb committed Nov 29, 2021
2 parents f0a13f1 + 8125dde commit 2f51705
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ static void encodeByteString(ByteBuf byteBuf, String s) {

static String decodeByteString(ByteBuf byteBuf, int offset) {
int length = byteBuf.getByte(offset);
length &= UNSIGNED_BYTE_MAX_VALUE;
offset += Byte.BYTES;

return byteBuf.toString(offset, length, StandardCharsets.UTF_8);
}

static int decodeByteStringLength(ByteBuf byteBuf, int offset) {
int length = byteBuf.getByte(offset);
length &= UNSIGNED_BYTE_MAX_VALUE;
return Byte.BYTES + length;
}

Expand Down

0 comments on commit 2f51705

Please sign in to comment.