|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
org.walluck.oscar.TLVChain
public class 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,
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. |
Object |
clone()
Clone this TLV chain. |
boolean |
equals(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. |
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, 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, 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, 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, String value) throws IOException
type
- the type of TLVvalue
- the string to add
IOException
- if an error occurspublic void addNull(int type) throws IOException
type
- the type of TLV
IOException
- if an error occurspublic void addByte(int type, int value) throws IOException
type
- the type of TLVvalue
- the byte to add
IOException
- if an error occurspublic void addBytes(int type, byte[] value) throws IOException
type
- the type of TLVvalue
- the byte array to add
IOException
- if an error occurspublic void addShort(int type, int value) throws IOException
type
- the type of TLVvalue
- the short to add
IOException
- if an error occurspublic void addInt(int type, int value) throws IOException
type
- the type of TLVvalue
- the integer to add
IOException
- if an error occurspublic void addTLV(TLV tlv)
tlv
- the TLV to addpublic void addTLVChain(int type, TLVChain tlvchain) throws IOException
type
- the type of TLVtlvchain
- the TLV chain to add
IOException
- if an error occurspublic void addCaps(int type, int caps) throws 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
IOException
- if an error occursAIMConstants
public void addChatRoom(int type, Chat chat) throws IOException
type
- the type of TLVchat
- the chat room
IOException
- if an error occurspublic int length()
public int size()
size
in interface Collection
size
in interface List
size
in class ArrayList
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 Object clone()
clone
in class ArrayList
public boolean equals(Object obj)
equals
in interface Collection
equals
in interface List
equals
in class AbstractList
obj
- the TLV chain to test
public int hashCode()
hashCode
in interface Collection
hashCode
in interface List
hashCode
in class AbstractList
public String toString()
toString
in class AbstractCollection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |