JML

net.sf.jqql.packets.in.disk
Class DownloadReplyPacket

java.lang.Object
  extended by net.sf.jqql.packets.Packet
      extended by net.sf.jqql.packets.InPacket
          extended by net.sf.jqql.packets.DiskInPacket
              extended by net.sf.jqql.packets.in.disk.DownloadReplyPacket

public class DownloadReplyPacket
extends DiskInPacket

 download file reply packet
 1. head
 2. file data

 下载文件回复包
 1. 头部
 2. 文件数据
 
 Note: For file may be very big, so does the packet. It's a problem for old packet parsing manner. Because most packets are parsed
 after all data are received. If the packet is too big, it need to reconsider  the implementation.

 Note: 由于文件可能很大,所以这个包也可能很大。这对旧的包解析方式是一个问题,因为对于大部分包,
 都是数据都收到之后再解析,而这个包由于可能过大,所以需要重新考虑其实现
 

Author:
luma

Field Summary
 byte[] bytes
           
 
Fields inherited from class net.sf.jqql.packets.DiskInPacket
replyCode, replyMessage
 
Fields inherited from class net.sf.jqql.packets.Packet
bodyBuf, bodyDecrypted, command, crypter, ds, duplicated, header, log, sequence, source, user
 
Constructor Summary
DownloadReplyPacket(ByteBuffer buf, int length, QQUser user)
           
 
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.DiskInPacket
decryptBody, encryptBody, equals, getBodyBytes, getCryptographStart, getFamily, getHeadLength, getLength, getTailLength, hashCode, parseHeader, parseTail, putBody, putHead, putTail
 
Methods inherited from class net.sf.jqql.packets.InPacket
validateHeader
 
Methods inherited from class net.sf.jqql.packets.Packet
dump, 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
 

Field Detail

bytes

public byte[] bytes
Constructor Detail

DownloadReplyPacket

public DownloadReplyPacket(ByteBuffer buf,
                           int length,
                           QQUser user)
                    throws PacketParseException
Throws:
PacketParseException
Method Detail

getPacketName

public String getPacketName()
Overrides:
getPacketName in class Packet
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