|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
org.walluck.oscar.TLVChain
A TLV chain is a block of one or more TLV's.
Field Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
TLVChain()
Creates a new TLV chain. |
|
TLVChain(int size)
Creates a new TLV chain of the specified size. |
Method Summary | |
void |
addByte(int type,
int value)
Add a byte to this TLV chain. |
void |
addBytes(int type,
byte[] value)
Add a byte array to this TLV chain. |
void |
addCaps(int type,
int caps)
Add a capabilities to this TLV chain. |
void |
addChatRoom(int type,
Chat chat)
Add a chat room to this TLV chain. |
void |
addInt(int type,
int value)
Add an integer to this TLV chain. |
void |
addNull(int type)
Add a null TLV to a null TLV to this TLV chain. |
void |
addShort(int type,
int value)
Add a short to this TLV chain. |
void |
addString(int type,
java.lang.String value)
Add a string to this TLV chain. |
void |
addTLV(TLV tlv)
Add a TLV to this TLV chain. |
void |
addTLVChain(int type,
TLVChain tlvchain)
Add a TLV chain to this TLV chain. |
java.lang.Object |
clone()
Clone this TLV chain. |
boolean |
equals(java.lang.Object obj)
Test two TLV chains for equality. |
TLV |
getTLV(int type,
int n)
Get the n-th occurence of a TLV of the specified type in this TLV chain. |
int |
hashCode()
Return the hashcode of this TLVChain. |
int |
length()
Return the length of this TLV chain in bytes |
void |
removeTLV(int type,
int n)
Remove the n-th occurence of a TLV of the specified type in this TLV chain. |
int |
size()
Return the number of TLV's in this TLV chain. |
java.lang.String |
toString()
Return a string representation of this TLV chain. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
Constructor Detail |
public TLVChain()
public TLVChain(int size)
size
- the number of TLV's that you are going to add to this chainMethod Detail |
public void addString(int type, java.lang.String value) throws java.io.IOException
type
- the type of TLVvalue
- the string to add
java.io.IOException
- if an error occurspublic void addNull(int type) throws java.io.IOException
type
- the type of TLV
java.io.IOException
- if an error occurspublic void addByte(int type, int value) throws java.io.IOException
type
- the type of TLVvalue
- the byte to add
java.io.IOException
- if an error occurspublic void addBytes(int type, byte[] value) throws java.io.IOException
type
- the type of TLVvalue
- the byte array to add
java.io.IOException
- if an error occurspublic void addShort(int type, int value) throws java.io.IOException
type
- the type of TLVvalue
- the short to add
java.io.IOException
- if an error occurspublic void addInt(int type, int value) throws java.io.IOException
type
- the type of TLVvalue
- the integer to add
java.io.IOException
- if an error occurspublic void addTLV(TLV tlv)
tlv
- the TLV to addpublic void addTLVChain(int type, TLVChain tlvchain) throws java.io.IOException
type
- the type of TLVtlvchain
- the TLV chain to add
java.io.IOException
- if an error occurspublic void addCaps(int type, int caps) throws java.io.IOException
The bitfield passed in should be a bitwise OR of any of the
AIM_CAPS
constants in AIMConstants.
For
example:
type
- the type of TLVcaps
- the capability block to add
java.io.IOException
- if an error occursAIMConstants
public void addChatRoom(int type, Chat chat) throws java.io.IOException
type
- the type of TLVchat
- the chat room
java.io.IOException
- if an error occurspublic int length()
public int size()
public TLV getTLV(int type, int n)
type
- the type of TLVn
- the occurence
public void removeTLV(int type, int n)
type
- the type of TLVn
- the occurencepublic java.lang.Object clone()
public boolean equals(java.lang.Object obj)
obj
- the TLV chain to test
public int hashCode()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |