JML

net.sf.jqql.packets.out.disk
Class PreparePacket

java.lang.Object
  extended by net.sf.jqql.packets.Packet
      extended by net.sf.jqql.packets.OutPacket
          extended by net.sf.jqql.packets.DiskOutPacket
              extended by net.sf.jqql.packets.out.disk.PreparePacket

public class PreparePacket
extends DiskOutPacket

 prepare to upload, download
 1. head
 2. id, 30 byte
 3. next command , 4 byte
 Note: part3  indicates next command. Here is 4 byte, maybe commnd should be 4 byte long, but it's ignored here.

 准备上传下载
 1. 头部
 2. id, 30字节
 3. 接下来的命令,4字节
 Note: 3部分表示后续的命令操作,这里是4字节,也许命令确实应该是4字节,不过这里忽略
 

Author:
luma

Field Summary
 
Fields inherited from class net.sf.jqql.packets.OutPacket
ack, key, resendCountDown, sendCount, seq, timeout
 
Fields inherited from class net.sf.jqql.packets.Packet
bodyBuf, bodyDecrypted, command, crypter, ds, duplicated, header, log, sequence, source, user
 
Constructor Summary
PreparePacket(ByteBuffer buf, int length, QQUser user)
           
PreparePacket(QQUser user)
           
 
Method Summary
 String getId()
           
 char getLaterCommand()
           
 String getPacketName()
           
protected  void putBody(ByteBuffer buf)
          initialize packet body 初始化包体
 void setId(String id)
           
 void setLaterCommand(char laterCommand)
           
 
Methods inherited from class net.sf.jqql.packets.DiskOutPacket
decryptBody, encryptBody, equals, getBodyBytes, getCryptographStart, getFamily, getHeadLength, getLength, getLocalIp, getTailLength, hashCode, parseHeader, parseTail, postFill, putHead, putTail, setLocalIp, validateHeader
 
Methods inherited from class net.sf.jqql.packets.OutPacket
dump, fill, getKey, getNextSeq, getSendCount, getTimeout, needAck, needResend, parseBody, setKey, setSendCount, setTimeout
 
Methods inherited from class net.sf.jqql.packets.Packet
getCommand, getHeader, getSequence, getSource, hash, isDuplicated, setDuplicated, setHeader, setSequence
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreparePacket

public PreparePacket(ByteBuffer buf,
                     int length,
                     QQUser user)
              throws PacketParseException
Throws:
PacketParseException

PreparePacket

public PreparePacket(QQUser user)
Method Detail

getPacketName

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

putBody

protected void putBody(ByteBuffer buf)
Description copied from class: Packet
initialize packet body 初始化包体

Specified by:
putBody in class Packet
Parameters:
buf - ByteBuffer

getId

public String getId()
Returns:
the id

setId

public void setId(String id)
Parameters:
id - the id to set

getLaterCommand

public char getLaterCommand()
Returns:
the laterCommand

setLaterCommand

public void setLaterCommand(char laterCommand)
Parameters:
laterCommand - the laterCommand to set

JML