public class ExtensionTypeHeader
extends java.lang.Object
| Constructor and Description |
|---|
ExtensionTypeHeader(byte type,
int length)
Create an extension type header
Example:
|
| Modifier and Type | Method and Description |
|---|---|
static byte |
checkedCastToByte(int code) |
boolean |
equals(java.lang.Object obj) |
int |
getLength() |
byte |
getType() |
int |
hashCode() |
boolean |
isTimestampType() |
java.lang.String |
toString() |
public ExtensionTypeHeader(byte type,
int length)
import org.msgpack.core.ExtensionTypeHeader;
import static org.msgpack.core.ExtensionTypeHeader.checkedCastToByte;
...
ExtensionTypeHeader header = new ExtensionTypeHeader(checkedCastToByte(0x01), 32);
...
type - extension type (byte). You can check the valid byte range with checkedCastToByte(int) method.length - extension type data lengthpublic static byte checkedCastToByte(int code)
public byte getType()
public boolean isTimestampType()
public int getLength()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object