public class Fragment
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
BIT_HAS_PADDING |
private static int |
BIT_LAST_FRAGMENT |
private byte[] |
byteArrayCache |
private boolean |
bytesCached |
static int |
DATA_OVERHEAD |
static int |
DATA_PAYLOAD_SIZE |
private static int |
DUMMY_PAYLOAD_SIZE |
private static int |
HEADER_SIZE |
(package private) static int |
ID_SIZE |
private static int |
INDEX_SIZE |
private static int |
INIT_OVERHEAD |
static int |
INIT_PAYLOAD_SIZE |
private boolean |
m_bisLast |
private int |
m_iFragmentNumber |
private int |
m_iMessageID |
private Padding |
padding |
private byte[] |
payload |
(package private) static int |
SINGLE_FRAGMENT_FRAGMENT_NUMBER |
(package private) static int |
SINGLE_FRAGMENT_MESSAGE_ID |
static int |
SIZE_DATA |
static int |
SIZE_INIT |
Constructor and Description |
---|
Fragment() |
Fragment(byte[] fragment) |
Fragment(byte[] fragment,
int length) |
Fragment(int message_id,
int fragment_number,
byte[] payload,
int payload_limit) |
Modifier and Type | Method and Description |
---|---|
(package private) int |
getFragment_number() |
(package private) int |
getMessage_id() |
(package private) byte[] |
getPadding_bytes() |
(package private) int |
getPadding_length() |
byte[] |
getPayload() |
(package private) boolean |
isLast() |
byte[] |
toBytes() |
public static final int DATA_OVERHEAD
private static final int INIT_OVERHEAD
private static final int DUMMY_PAYLOAD_SIZE
public static final int DATA_PAYLOAD_SIZE
public static final int INIT_PAYLOAD_SIZE
static final int ID_SIZE
private static final int INDEX_SIZE
private static final int HEADER_SIZE
public static final int SIZE_DATA
public static final int SIZE_INIT
static final int SINGLE_FRAGMENT_MESSAGE_ID
static final int SINGLE_FRAGMENT_FRAGMENT_NUMBER
private static final int BIT_HAS_PADDING
private static final int BIT_LAST_FRAGMENT
private int m_iMessageID
private int m_iFragmentNumber
private final boolean m_bisLast
private byte[] payload
private boolean bytesCached
private byte[] byteArrayCache
private Padding padding
public Fragment()
public Fragment(int message_id, int fragment_number, byte[] payload, int payload_limit)
public Fragment(byte[] fragment) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public Fragment(byte[] fragment, int length) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
int getMessage_id()
int getFragment_number()
boolean isLast()
public byte[] getPayload()
int getPadding_length()
byte[] getPadding_bytes()
public byte[] toBytes() throws java.io.IOException
java.io.IOException
Copyright © 2023. All rights reserved.