|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSsiItem
A data structure used to store various types of "items" on the server. These
items can be buddies (with comments and buddy alert data), groups, blocked
buddies, and other settings. See the the
ssiitem
package for more logical implementations of specific
SSI item types.
net.kano.joscar.ssiitem
,
Serialized FormField Summary | |
static int |
TYPE_BUDDY
An SSI item type for a buddy. |
static int |
TYPE_DENY
An SSI item type for a "blocked" user, or "deny." |
static int |
TYPE_GROUP
An SSI item type for a buddy group. |
static int |
TYPE_ICON_INFO
An SSI item type for a buddy icon hash. |
static int |
TYPE_PERMIT
An SSI item type for an "allowed" user, or "permit." |
static int |
TYPE_PRIVACY
An SSI item type for various privacy-related settings. |
static int |
TYPE_VISIBILITY
An SSI item type for various "visiblity-related" settings. |
Constructor Summary | |
SsiItem(int parentid,
int id,
int type)
Creates a new SSI item with no name or type-specific data and with the given parent ID, sub ID, and item type. |
|
SsiItem(java.lang.String name,
int parentid,
int id,
int type,
ByteBlock data)
Creates a new SSI item with the given properties. |
Method Summary | |
ByteBlock |
getData()
Returns the type-specific data stored in this item. |
int |
getId()
Returns the ID or "sub ID" of this item. |
int |
getItemType()
Returns this item's type. |
java.lang.String |
getName()
Returns the name of this item. |
int |
getParentId()
Returns the "parent ID" of this item. |
int |
getTotalSize()
Returns the total size, in bytes, of this object, if read from an incoming block of binary data. |
protected static SsiItem |
readSsiItem(ByteBlock block)
Generates a new SSI item from the given block of binary data, or null if no valid item could be read. |
java.lang.String |
toString()
|
void |
write(java.io.OutputStream out)
Writes a representation of this object to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int TYPE_BUDDY
BuddyItem
,
Constant Field Valuespublic static final int TYPE_GROUP
RootItem
,
GroupItem
,
Constant Field Valuespublic static final int TYPE_PERMIT
PermitItem
,
Constant Field Valuespublic static final int TYPE_DENY
DenyItem
,
Constant Field Valuespublic static final int TYPE_PRIVACY
PrivacyItem
,
Constant Field Valuespublic static final int TYPE_VISIBILITY
VisibilityItem
,
Constant Field Valuespublic static final int TYPE_ICON_INFO
IconItem
,
Constant Field ValuesConstructor Detail |
public SsiItem(int parentid, int id, int type)
parentid
- the "parent ID" of this itemid
- the ID of this item in its parenttype
- the type of this item, like TYPE_BUDDY
public SsiItem(java.lang.String name, int parentid, int id, int type, ByteBlock data)
name
- the name of this itemparentid
- the "parent ID" of this itemid
- the ID of this item in its parenttype
- the type of this item, like TYPE_GROUP
data
- a block of type-specific data, or null
(or an
empty block) for noneMethod Detail |
protected static SsiItem readSsiItem(ByteBlock block)
null
if no valid item could be read.
block
- a block of data containing an SSI item
null
if none could be readpublic final java.lang.String getName()
public final int getParentId()
public final int getId()
public final int getItemType()
TYPE_*
constants defined in this class.
public final ByteBlock getData()
public int getTotalSize()
-1
if
this item was not read from an incoming data block.
public void write(java.io.OutputStream out) throws java.io.IOException
LiveWritable
write
in interface LiveWritable
out
- the stream to which to write
java.io.IOException
- if an I/O error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |