public class TBin extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CURRENT_VERSION |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
bytes(Object o)
Encode the object into TBin, reflecting as needed.
|
static byte[] |
bytes(Object o,
TypeDef sig) |
static byte[] |
bytes(Object o,
TypeRegistry reg,
String typeName) |
static Object |
fromBytes(byte[] tbinData)
Decode the TBin bytes, producing a generic representation of the data.
|
static <T> T |
fromBytes(byte[] tbinData,
Class<T> dataType)
Decode the TBin bytes, mapping the result onto the target class.
|
static String |
hex(byte[] bytes,
int count) |
static String |
hexByte(byte b) |
static String |
hexByte(int b) |
public static final int CURRENT_VERSION
public static byte[] bytes(Object o)
o - the object to encodepublic static byte[] bytes(Object o, TypeRegistry reg, String typeName)
public static Object fromBytes(byte[] tbinData)
tbinData - the TBin-encoded data to decodepublic static <T> T fromBytes(byte[] tbinData,
Class<T> dataType)
T - the type of data expectedtbinData - the TBin-encoded data to decodedataType - the class to decode as.public static String hexByte(byte b)
public static String hexByte(int b)
public static String hex(byte[] bytes, int count)
Copyright © 2016–2021 Verizon Media. All rights reserved.