public class ChunkHeader extends Object
The header is 2 bytes, in the network order. The first bit designates whether this chunk is the last chunk (0 if this is the last chunk), and the remaining 15 bits designate the length of the chunk as unsigned number.
Constructor and Description |
---|
ChunkHeader() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isLast(int header) |
static int |
length(int header) |
static byte[] |
pack(int length,
boolean hasMore) |
static int |
parse(byte[] buf) |
static int |
parse(byte[] buf,
int pos) |
static int |
parse(int b1,
int b2) |
public static int parse(byte[] buf)
public static int parse(byte[] buf, int pos)
public static int parse(int b1, int b2)
public static boolean isLast(int header)
public static int length(int header)
public static byte[] pack(int length, boolean hasMore)
Copyright © 2016. All rights reserved.