public class BEValue extends Object
| Constructor and Description |
|---|
BEValue(byte[] value)
Creates a new BEValue wrapping a byte array.
|
BEValue(List<BEValue> value)
Creates a new BEValue wrapping a List.
|
BEValue(Map<String,BEValue> value)
Creates a new BEValue wrapping a Map.
|
BEValue(Number value)
Creates a new BEValue wrapping a Number.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Returns this BEValue as a byte[].
|
int |
getInt()
Returns this BEValue as int.
|
List<BEValue> |
getList()
Returns this BEValue as a List of BEValues.
|
long |
getLong()
Returns this BEValue as long.
|
Map<String,BEValue> |
getMap()
Returns this BEValue as a Map of BEValue keys and BEValue values.
|
Number |
getNumber()
Returns this BEValue as a Number.
|
String |
getString()
Returns this BEValue as a String.
|
Object |
getValue()
Returns the untyped value contained in this BEValue.
|
String |
toString() |
public BEValue(byte[] value)
value - the byte array value to wrappublic BEValue(List<BEValue> value)
value - the List value to wrappublic BEValue(Map<String,BEValue> value)
value - the Map value to wrappublic BEValue(Number value)
value - the Number value to wrappublic byte[] getBytes()
throws InvalidBEncodingException
InvalidBEncodingException - if the value is not a byte arraypublic int getInt()
throws InvalidBEncodingException
Number.intValue().InvalidBEncodingException - if the value is not a Numberpublic List<BEValue> getList() throws InvalidBEncodingException
InvalidBEncodingException - if the value is not a Listpublic long getLong()
throws InvalidBEncodingException
Number.longValue().InvalidBEncodingException - if the value is not a Numberpublic Map<String,BEValue> getMap() throws InvalidBEncodingException
InvalidBEncodingException - if the value is not a Mappublic Number getNumber() throws InvalidBEncodingException
InvalidBEncodingException - if the value is not a Numberpublic String getString() throws InvalidBEncodingException
InvalidBEncodingException - if the value is not a byte arraypublic Object getValue()