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() |
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.