|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectExtraInfoBlock
Represents an "extra information block," as I call it, which contains a
single result code and an ExtraInfoData. This structure is used
in various SNAC commands related to buddy icons and iChat availabilty
messages.
| Field Summary | |
static int |
TYPE_AIMEXPINFO
An extra info block type indicating that the block contains AIM Expression information. |
static int |
TYPE_AVAILMSG
An extra info block type indicating that it contains iChat availability message information. |
static int |
TYPE_CERTINFO_HASHA
An extra info block type indicating that the block contains a security-related MD5 hash whose significance is unknown at the time of this writing. |
static int |
TYPE_CERTINFO_HASHB
An extra info block type indicating that the block contains a security-related MD5 hash whose significance is unknown at the time of this writing. |
static int |
TYPE_ICONHASH
An extra info block type indicating that it contains buddy icon information. |
| Constructor Summary | |
|
ExtraInfoBlock(int type,
ExtraInfoData extraData)
Creates an extra info block object with the given type code and data. |
protected |
ExtraInfoBlock(int code,
ExtraInfoData data,
int totalSize)
Creates a new extra info block object with the given properties. |
| Method Summary | |
ExtraInfoData |
getExtraData()
The data embedded in this extra info block. |
int |
getTotalSize()
Returns the total size, in bytes, of this object. |
int |
getType()
Returns the type code for this extra info block. |
long |
getWritableLength()
Returns the length of the data that was or will be written in a call to write. |
static ExtraInfoBlock |
readExtraInfoBlock(ByteBlock block)
Reads an extra info block from the given data block. |
static ExtraInfoBlock[] |
readExtraInfoBlocks(ByteBlock block)
Reads a series of ExtraInfoBlocks from the given block. |
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_ICONHASH
public static final int TYPE_AVAILMSG
public static final int TYPE_AIMEXPINFO
public static final int TYPE_CERTINFO_HASHA
public static final int TYPE_CERTINFO_HASHB
| Constructor Detail |
protected ExtraInfoBlock(int code,
ExtraInfoData data,
int totalSize)
code - the type code associated with this extra info block object,
like TYPE_AVAILMSGdata - the data in this extra info blocktotalSize - the total size of this object, if read from a block
of data
public ExtraInfoBlock(int type,
ExtraInfoData extraData)
type - the type of data being stored in this extra info blockextraData - a block of extra info data| Method Detail |
public static ExtraInfoBlock[] readExtraInfoBlocks(ByteBlock block)
ExtraInfoBlocks from the given block. The
total number of bytes read is the sum of calling
getTotalSize on each element of the returned array.
block - the block containing zero or more extra info blocks
public static ExtraInfoBlock readExtraInfoBlock(ByteBlock block)
block - the data block from which to read
null if no valid object could be readpublic final int getType()
TYPE_ICONHASH and TYPE_AVAILMSG.
public final ExtraInfoData getExtraData()
public final int getTotalSize()
-1
if this object was not read using readExtraInfoBlock or
readExtraInfos.
public long getWritableLength()
Writablewrite. The value returned by this method must not
change after its first invocation.
getWritableLength in interface Writablewrite
public void write(java.io.OutputStream out)
throws java.io.IOException
WritablegetWritableLength.
write in interface Writableout - 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 | |||||||||