|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdiameter.client.impl.parser.ElementParser
public class ElementParser
| Constructor Summary | |
|---|---|
ElementParser()
|
|
| Method Summary | ||
|---|---|---|
byte[] |
addressToBytes(java.net.InetAddress address)
Convert InetAddress to byte array representation |
|
java.net.InetAddress |
bytesToAddress(byte[] rawData)
Convert byte array to InetAddress |
|
java.util.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 |
|
|
bytesToObject(java.lang.Class<?> iface,
byte[] rawdata)
Convert byte array to specefied object |
|
java.lang.String |
bytesToOctetString(byte[] rawData)
Convert byte array to octet string |
|
java.lang.String |
bytesToUtf8String(byte[] rawData)
Convert byte array to utf8 string |
|
byte[] |
dateToBytes(java.util.Date date)
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(java.lang.Object data)
Convert specefied object to byte array representation |
|
byte[] |
octetStringToBytes(java.lang.String value)
Convert octet string to byte array representation |
|
protected java.nio.ByteBuffer |
prepareBuffer(byte[] bytes,
int len)
|
|
byte[] |
utf8StringToBytes(java.lang.String value)
Convert utf8 string to byte array representation |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ElementParser()
| Method Detail |
|---|
public int bytesToInt(byte[] rawData)
throws org.jdiameter.api.AvpDataException
IElementParser
bytesToInt in interface IElementParserrawData - byte representation of int value
org.jdiameter.api.AvpDataException
public long bytesToLong(byte[] rawData)
throws org.jdiameter.api.AvpDataException
IElementParser
bytesToLong in interface IElementParserrawData - byte representation of long value
org.jdiameter.api.AvpDataException
public float bytesToFloat(byte[] rawData)
throws org.jdiameter.api.AvpDataException
IElementParser
bytesToFloat in interface IElementParserrawData - byte representation of float value
org.jdiameter.api.AvpDataException
public double bytesToDouble(byte[] rawData)
throws org.jdiameter.api.AvpDataException
IElementParser
bytesToDouble in interface IElementParserrawData - byte representation of double value
org.jdiameter.api.AvpDataException
protected java.nio.ByteBuffer prepareBuffer(byte[] bytes,
int len)
public java.lang.String bytesToOctetString(byte[] rawData)
throws org.jdiameter.api.AvpDataException
IElementParser
bytesToOctetString in interface IElementParserrawData - byte representation of octet string value
org.jdiameter.api.AvpDataException
public java.lang.String bytesToUtf8String(byte[] rawData)
throws org.jdiameter.api.AvpDataException
IElementParser
bytesToUtf8String in interface IElementParserrawData - byte representation of utf8 string value
org.jdiameter.api.AvpDataException
public java.util.Date bytesToDate(byte[] rawData)
throws org.jdiameter.api.AvpDataException
IElementParser
bytesToDate in interface IElementParserrawData - byte representation of date value
org.jdiameter.api.AvpDataException
public java.net.InetAddress bytesToAddress(byte[] rawData)
throws org.jdiameter.api.AvpDataException
IElementParser
bytesToAddress in interface IElementParserrawData - byte representation of InetAddress value
org.jdiameter.api.AvpDataExceptionpublic byte[] int32ToBytes(int value)
IElementParser
int32ToBytes in interface IElementParservalue - int value
public byte[] intU32ToBytes(long value)
IElementParser
intU32ToBytes in interface IElementParservalue - long value
public byte[] int64ToBytes(long value)
IElementParser
int64ToBytes in interface IElementParservalue - long value
public byte[] float32ToBytes(float value)
IElementParser
float32ToBytes in interface IElementParservalue - float value
public byte[] float64ToBytes(double value)
IElementParser
float64ToBytes in interface IElementParservalue - double value
public byte[] octetStringToBytes(java.lang.String value)
throws DecodeException
IElementParser
octetStringToBytes in interface IElementParservalue - octet string value
DecodeException
public byte[] utf8StringToBytes(java.lang.String value)
throws DecodeException
IElementParser
utf8StringToBytes in interface IElementParservalue - utf8 string value
DecodeExceptionpublic byte[] addressToBytes(java.net.InetAddress address)
IElementParser
addressToBytes in interface IElementParseraddress - InetAddress value
public byte[] dateToBytes(java.util.Date date)
IElementParser
dateToBytes in interface IElementParserdate - Date value
public <T> T bytesToObject(java.lang.Class<?> iface,
byte[] rawdata)
throws org.jdiameter.api.AvpDataException
IElementParser
bytesToObject in interface IElementParseriface - type of objectrawdata - byte representation of InetAddress value
org.jdiameter.api.AvpDataException
public byte[] objectToBytes(java.lang.Object data)
throws DecodeException
IElementParser
objectToBytes in interface IElementParserdata - object
DecodeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||