net.sf.jqql.packets.in.disk
Class DownloadReplyPacket
java.lang.Object
net.sf.jqql.packets.Packet
net.sf.jqql.packets.InPacket
net.sf.jqql.packets.DiskInPacket
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.Packet |
bodyBuf, bodyDecrypted, command, crypter, ds, duplicated, header, log, sequence, source, user |
| Methods inherited from class net.sf.jqql.packets.DiskInPacket |
decryptBody, encryptBody, equals, getBodyBytes, getCryptographStart, getFamily, getHeadLength, getLength, getTailLength, hashCode, parseHeader, parseTail, putBody, putHead, putTail |
bytes
public byte[] bytes
DownloadReplyPacket
public DownloadReplyPacket(ByteBuffer buf,
int length,
QQUser user)
throws PacketParseException
- Throws:
PacketParseException
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
如果解析出错