|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.walluck.oscar.TLV
TLV - Type Length Value.
It is a tuple allowing typed opaque information to be passed through the OSCAR protocol. Typically, TLV's are intended for interpretation at the core layer. Since they are typed, new TLV elements can be added to the protocol without modifying the lower layers.
TLVType
Constructor Summary | |
TLV()
Creates a new (empty) TLV. |
|
TLV(int type,
int length,
byte[] value)
Creates a new TLV. |
Method Summary | |
int |
getLength()
Get the value of length. |
int |
getType()
Get the value of type. |
byte[] |
getValue()
Get the value of value. |
byte |
getValueByte()
Get the value of this TLV as a byte. |
int |
getValueInt()
Get the value of this TLV as an integer. |
short |
getValueShort()
Get the value of this TLV as a short. |
java.lang.String |
getValueString()
Get the value of this TLV as a string. |
java.lang.String |
getValueString(java.lang.String enc)
Get the value of this TLV as a string with the given encoding. |
void |
setLength(int length)
Set the value of length. |
void |
setType(int type)
Set the value of type. |
void |
setValue(byte[] value)
Set the value of value. |
void |
setValueByte(int value)
Set the value of this TLV as a byte |
void |
setValueInt(int value)
Set the value of this TLV as an integer |
void |
setValueShort(int value)
Set the value of this TLV as a short. |
void |
setValueString(java.lang.String value)
Set the value of this TLV as a string |
java.lang.String |
toString()
Return a string representation of this TLV. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TLV()
public TLV(int type, int length, byte[] value) throws java.io.IOException
type
- the type of TLVlength
- the length of the TLVvalue
- the value of the TLV
java.io.IOException
- if an error occursMethod Detail |
public int getType()
public void setType(int type)
type
- Value to assign to type.public int getLength()
public void setLength(int length)
length
- Value to assign to length.public byte[] getValue()
public void setValue(byte[] value)
value
- Value to assign to value.public java.lang.String getValueString(java.lang.String enc) throws java.io.UnsupportedEncodingException
enc
- the AOL encoding string
java.io.UnsupportedEncodingException
- if an error occurspublic java.lang.String getValueString() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
- if an error occurspublic void setValueString(java.lang.String value) throws java.io.IOException
value
- the string to assign to this TLV
java.io.IOException
- if an error occurspublic byte getValueByte() throws java.io.IOException
java.io.IOException
- if an error occurspublic void setValueByte(int value) throws java.io.IOException
value
- the byte to assign to this TLV
java.io.IOException
- if an error occurspublic short getValueShort() throws java.io.IOException
java.io.IOException
- if an error occurspublic void setValueShort(int value) throws java.io.IOException
value
- the short to assign to this TLV
java.io.IOException
- if an error occurspublic int getValueInt() throws java.io.IOException
java.io.IOException
- if an error occurspublic void setValueInt(int value) throws java.io.IOException
value
- the integer to assign to this TLV
java.io.IOException
- if an error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |