public class NSHead extends Object
typedef struct _nshead_t
{
unsigned short id; ///
2+2+4+16+4+4+4=36 byte in total.
| Modifier and Type | Field and Description |
|---|---|
int |
bodyLength |
short |
id |
int |
logId |
int |
magicNumber |
static int |
NSHEAD_LENGTH |
static int |
NSHEAD_MAGIC_NUM |
String |
provider |
static int |
PROVIDER_LENGTH |
int |
reserved |
short |
version |
| Constructor and Description |
|---|
NSHead() |
NSHead(int logId,
int bodyLength) |
NSHead(int logId,
short id,
short version,
String provider,
int bodyLength) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static NSHead |
fromByteBuf(io.netty.buffer.ByteBuf buf) |
int |
hashCode() |
byte[] |
toBytes() |
String |
toString() |
public static final int NSHEAD_LENGTH
public static final int NSHEAD_MAGIC_NUM
public static final int PROVIDER_LENGTH
public short id
public short version
public int logId
public String provider
public int magicNumber
public int reserved
public int bodyLength
public NSHead(int logId,
short id,
short version,
String provider,
int bodyLength)
public NSHead(int logId,
int bodyLength)
public NSHead()
public static NSHead fromByteBuf(io.netty.buffer.ByteBuf buf) throws BadSchemaException
BadSchemaExceptionpublic byte[] toBytes()
Copyright © 2022 Baidu, Inc.. All rights reserved.