JML

net.sf.jqql.packets.in
Class GroupDataOpReplyPacket

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.GroupDataOpReplyPacket

public class GroupDataOpReplyPacket
extends BasicInPacket

 reply packet of group data download
 1. header
 2. subcommand, 1 byte, download is 0x1
 3. reply code, 1 byte
 5. unknown 4 byte
 6. group sequence, begin from 1, 0 means my friend group, cause is default group, not include in packet
 7. 16 byte group info, begin with group name, end by 0, if length not enough 16 byte, then other part is 0, or ather  
    unknown byte
 8. if has many group, repeat part 6 and 7
 9. tail
 
 reply packet of group data upload
 1. header
 2. subcommand, 1 byte
 3. reply code, 1 byte
 4. group sequence, begin from 1, 0 means my friend group, cause is default group, not include in packet
 5. if has more group ,repeat part 4
 6. tail

 下载分组名称的回复包,格式为
 1. 头部
 2. 子命令,1字节,下载是0x1
 3. 回复码,1字节
 5. 未知的4字节
 6. 组序号,从1开始,0表示我的好友组,因为是缺省组,所以不包含在包中
 7. 16字节的组信息,开始是组名,以0结尾,如果长度不足16字节,则其余部分可能为0,也可能
    为其他字节,含义不明
 8. 若有多个组,重复6,7部分
 9. 尾部
 
 上传分组名称的回复包,格式为
 1. 头部
 2. 子命令,1字节
 3. 回复码,1字节
 4. 组需要,从1开始,0表示我的好友组,因为是缺省组,所以不包含在包中
 5. 如果有更多组,重复4部分
 6. 尾部
 

Author:
luma

Field Summary
 List<String> groupNames
           
 byte replyCode
           
 byte subCommand
           
 
Fields inherited from class net.sf.jqql.packets.Packet
bodyBuf, bodyDecrypted, command, crypter, ds, duplicated, header, log, sequence, source, user
 
Constructor Summary
GroupDataOpReplyPacket(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

groupNames

public List<String> groupNames

subCommand

public byte subCommand

replyCode

public byte replyCode
Constructor Detail

GroupDataOpReplyPacket

public GroupDataOpReplyPacket(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