public class Packet extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CHECKSUM_SIZE |
static int |
HEADER_SIZE |
static int |
MAX_DATA |
static int |
MAX_SIZE |
static int |
MIN_SIZE |
Constructor and Description |
---|
Packet() |
Modifier and Type | Method and Description |
---|---|
static int |
calculateMaxData(int remaining) |
static byte[] |
decode(int offset,
ByteBuffer data,
int size) |
static int |
decodeSize(int offset,
ByteBuffer data) |
static ByteBuffer |
encode(int offset,
byte[] data) |
static ByteBuffer |
encode(int offset,
ByteBuffer[] data,
int maxDataSize) |
static byte[] |
getBytes(ByteBuffer[] srcs,
int maxSize) |
static byte[] |
getCloseData() |
static boolean |
isClose(byte[] data) |
public static final int MAX_SIZE
public static final int HEADER_SIZE
public static final int CHECKSUM_SIZE
public static final int MIN_SIZE
public static final int MAX_DATA
public static int calculateMaxData(int remaining)
public static boolean isClose(byte[] data)
public static byte[] getCloseData()
public static byte[] getBytes(ByteBuffer[] srcs, int maxSize)
public static ByteBuffer encode(int offset, ByteBuffer[] data, int maxDataSize)
public static ByteBuffer encode(int offset, byte[] data)
public static int decodeSize(int offset, ByteBuffer data)
public static byte[] decode(int offset, ByteBuffer data, int size)
Copyright © 2017–2022 SNF4J.ORG. All rights reserved.