public interface IElementParser
| Modifier and Type | Method and Description |
|---|---|
byte[] |
addressToBytes(InetAddress value)
Convert InetAddress to byte array representation
|
InetAddress |
bytesToAddress(byte[] rawData)
Convert byte array to InetAddress
|
Date |
bytesToDate(byte[] rawData)
Convert byte array to date
|
double |
bytesToDouble(byte[] rawData)
Convert byte array to double
|
float |
bytesToFloat(byte[] rawData)
Convert byte array to float
|
int |
bytesToInt(byte[] rawData)
Convert byte array to int
|
long |
bytesToLong(byte[] rawData)
Convert byte array to long
|
<T> T |
bytesToObject(Class<?> iface,
byte[] rawData)
Convert byte array to specefied object
|
String |
bytesToOctetString(byte[] rawData)
Convert byte array to octet string
|
String |
bytesToUtf8String(byte[] rawData)
Convert byte array to utf8 string
|
byte[] |
dateToBytes(Date value)
Convert Date to byte array representation
|
byte[] |
float32ToBytes(float value)
Convert float to byte array representation
|
byte[] |
float64ToBytes(double value)
Convert double to byte array representation
|
byte[] |
int32ToBytes(int value)
Convert int to byte array representation
|
byte[] |
int64ToBytes(long value)
Convert long to byte array representation
|
byte[] |
intU32ToBytes(long value)
Convert long to 4-byte array representation
|
byte[] |
objectToBytes(Object value)
Convert specified object to byte array representation
|
byte[] |
octetStringToBytes(String value)
Convert octet string to byte array representation
|
byte[] |
utf8StringToBytes(String value)
Convert utf8 string to byte array representation
|
int bytesToInt(byte[] rawData)
throws AvpDataException
rawData - byte representation of int valueAvpDataExceptionlong bytesToLong(byte[] rawData)
throws AvpDataException
rawData - byte representation of long valueAvpDataExceptionfloat bytesToFloat(byte[] rawData)
throws AvpDataException
rawData - byte representation of float valueAvpDataExceptiondouble bytesToDouble(byte[] rawData)
throws AvpDataException
rawData - byte representation of double valueAvpDataExceptionString bytesToOctetString(byte[] rawData) throws AvpDataException
rawData - byte representation of octet string valueAvpDataExceptionString bytesToUtf8String(byte[] rawData) throws AvpDataException
rawData - byte representation of utf8 string valueAvpDataExceptionDate bytesToDate(byte[] rawData) throws AvpDataException
rawData - byte representation of date valueAvpDataExceptionInetAddress bytesToAddress(byte[] rawData) throws AvpDataException
rawData - byte representation of InetAddress valueAvpDataExceptionbyte[] int32ToBytes(int value)
value - int valuebyte[] intU32ToBytes(long value)
value - long valuebyte[] int64ToBytes(long value)
value - long valuebyte[] float32ToBytes(float value)
value - float valuebyte[] float64ToBytes(double value)
value - double valuebyte[] octetStringToBytes(String value) throws ParseException
value - octet string valueParseExceptionbyte[] utf8StringToBytes(String value) throws ParseException
value - utf8 string valueParseExceptionbyte[] addressToBytes(InetAddress value)
value - InetAddress valuebyte[] dateToBytes(Date value)
value - Date value<T> T bytesToObject(Class<?> iface, byte[] rawData) throws AvpDataException
rawData - byte representation of InetAddress valueiface - type of objectAvpDataExceptionbyte[] objectToBytes(Object value) throws ParseException
value - objectParseExceptionCopyright © 2016. All Rights Reserved.