Package com.batch.android.msgpack.core
Class ExtensionTypeHeader
- java.lang.Object
-
- com.batch.android.msgpack.core.ExtensionTypeHeader
-
public class ExtensionTypeHeader extends java.lang.ObjectHeader of the Extension types
-
-
Constructor Summary
Constructors Constructor Description ExtensionTypeHeader(byte type, int length)Create an extension type header Example:
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static bytecheckedCastToByte(int code)booleanequals(java.lang.Object obj)intgetLength()bytegetType()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
ExtensionTypeHeader
public ExtensionTypeHeader(byte type, int length)Create an extension type header Example:import com.batch.android.msgpack.core.ExtensionTypeHeader; import static com.batch.android.msgpack.core.ExtensionTypeHeader.checkedCastToByte; ... ExtensionTypeHeader header = new ExtensionTypeHeader(checkedCastToByte(0x01), 32); ...- Parameters:
type- extension type (byte). You can check the valid byte range withcheckedCastToByte(int)method.length- extension type data length
-
-
Method Detail
-
checkedCastToByte
public static byte checkedCastToByte(int code)
-
getType
public byte getType()
-
getLength
public int getLength()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-