JML

net.sf.jqql.packets.in
Class GetFriendListReplyPacket

java.lang.Object
  extended by net.sf.jqql.packets.Packet
      extended by net.sf.jqql.packets.InPacket
          extended by net.sf.jqql.packets.BasicInPacket
              extended by net.sf.jqql.packets.in.GetFriendListReplyPacket

public class GetFriendListReplyPacket
extends BasicInPacket

 reply packet of request friend list, its format is
 1. header
 2. beginning position of next friend list, this position is your all friend  *    after compositor, if is 0xFFFF, that means your friend all got
    everytime return 50 friend, if not enough, it must be 0xFFFF.
 3. friend QQ number, 4 byte
 4. face, 2 byte
 5. age, 1 byte
 6. sex, 1 byte
 7. nickname length, 1 byte
 8. nickname, uncertainty length byte, decide by 8
 9. use sign byte, 4 byte
 10. repeat 3-9 part
 11. tail
 请求好友列表的应答包,格式为
 1. 头部
 2. 下一次好友列表开始位置,这个位置是你所有好友排序后的位置,如果为0xFFFF,那就是你的好友已经全部得到了
    每次都固定的返回50个好友,所以如果不足50个了,那么这个值一定是0xFFFF了
 3. 好友QQ号,4字节
 4. 头像,2字节
 5. 年龄,1字节
 6. 性别,1字节
 7. 昵称长度,1字节
 8. 昵称,不定字节,由8指定
 9. 用户标志字节,4字节
 10. 重复3-9的结构
 11.尾部
 

Author:
luma
See Also:
QQFriend

Field Summary
 List<QQFriend> friends
           
 char position
           
 
Fields inherited from class net.sf.jqql.packets.Packet
bodyBuf, bodyDecrypted, command, crypter, ds, duplicated, header, log, sequence, source, user
 
Constructor Summary
GetFriendListReplyPacket(ByteBuffer buf, int length, QQUser user)
          constructed function 构造函数
 
Method Summary
 String getPacketName()
           
protected  void parseBody(ByteBuffer buf)
          parse packet body, from begin position of buf 解析包体,从buf的开头位置解析起
 
Methods inherited from class net.sf.jqql.packets.BasicInPacket
decryptBody, encryptBody, getBodyBytes, getCryptographStart, getFamily, getHeadLength, getLength, getTailLength, parseHeader, parseTail, putBody, putHead, putTail, toString
 
Methods inherited from class net.sf.jqql.packets.InPacket
validateHeader
 
Methods inherited from class net.sf.jqql.packets.Packet
dump, equals, getCommand, getHeader, getSequence, getSource, hash, hashCode, isDuplicated, setDuplicated, setHeader, setSequence
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

position

public char position

friends

public List<QQFriend> friends
Constructor Detail

GetFriendListReplyPacket

public GetFriendListReplyPacket(ByteBuffer buf,
                                int length,
                                QQUser user)
                         throws PacketParseException
constructed function 构造函数

Parameters:
buf - 缓冲区 // buffer
length - 包长度 // packet length
Throws:
PacketParseException - 解析错误 // parse error
Method Detail

getPacketName

public String getPacketName()
Overrides:
getPacketName in class BasicInPacket
Returns:
descriptive name of packet 包的描述性名称

parseBody

protected void parseBody(ByteBuffer buf)
                  throws PacketParseException
Description copied from class: Packet
parse packet body, from begin position of buf 解析包体,从buf的开头位置解析起

Specified by:
parseBody in class Packet
Parameters:
buf - ByteBuffer
Throws:
PacketParseException - if parse error 如果解析出错

JML