|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jqql.packets.Packet
net.sf.jqql.packets.OutPacket
net.sf.jqql.packets.DiskOutPacket
public abstract class DiskOutPacket
QQ disk protocol family output packet 1. packet length, 4 byte, exclusive 2. version sign, 2 byte 3. unknown 2 byte 4. command 2 byte 5. unknown 60 byte 6. my ip string form, 15 byte, not enough write 0 7. unknown 69 byte 8. packet body Note: this protocol family packet body doesn't encrypt, and only use in TCP connect
QQ硬盘åè®®æ—输出包 1. 包长,4å—节,exclusive 2. ç‰ˆæœ¬æ ‡è¯†ï¼Œ2å—节 3. 未知的2å—节 4. 命令,2å—节 5. 未知的60å—节 6. 我的ipçš„å—符串形å¼ï¼Œ15å—节,ä¸è¶³å¡«0 7. 未知的69å—节 8. 包体 Note: æ¤åè®®æ—包体ä¸åŠ å¯†ï¼Œå¹¶ä¸”åªç”¨äºŽTCP连接
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 | |
---|---|
DiskOutPacket(ByteBuffer buf,
int length,
QQUser user)
|
|
DiskOutPacket(char command,
QQUser user)
|
Method Summary | |
---|---|
protected byte[] |
decryptBody(byte[] body,
int offset,
int length)
decrypt packet body 解密包体 |
protected byte[] |
encryptBody(byte[] b,
int offset,
int length)
encrypt packet body åŠ å¯†åŒ…ä½“ |
boolean |
equals(Object obj)
|
protected byte[] |
getBodyBytes(ByteBuffer buf,
int length)
get byte array of packet body 得到包体的å—节数组 |
protected int |
getCryptographStart()
|
int |
getFamily()
|
protected int |
getHeadLength()
|
protected int |
getLength(int bodyLength)
get total length of UDP form packet, rule out TCP form 得到UDPå½¢å¼åŒ…的总长度,ä¸è€ƒè™‘TCPå½¢å¼ |
String |
getLocalIp()
|
protected int |
getTailLength()
|
int |
hashCode()
make up sequence number and command as hash code. |
protected void |
parseHeader(ByteBuffer buf)
parse packet header from current position of buf 从buf的当å‰ä½ç½®è§£æžåŒ…头 |
protected void |
parseTail(ByteBuffer buf)
parse packet tail from current position of buf 从bufçš„å½“å‰æœªçŸ¥è§£æžåŒ…å°¾ |
protected void |
postFill(ByteBuffer buf,
int startPos)
backfill, some field must fill whole packet to make sure its content, for example length field, then this method will be used after tail filling. |
protected void |
putHead(ByteBuffer buf)
change packet header to byte stream, and write into appointed ByteBuffer object. |
protected void |
putTail(ByteBuffer buf)
change packet tail to byte stream, and write into appointed ByteBuffer object. |
void |
setLocalIp(String localIp)
|
protected boolean |
validateHeader()
checkout header æ ¡éªŒå¤´éƒ¨ |
Methods inherited from class net.sf.jqql.packets.OutPacket |
---|
dump, fill, getKey, getNextSeq, getPacketName, getSendCount, getTimeout, needAck, needResend, parseBody, setKey, setSendCount, setTimeout |
Methods inherited from class net.sf.jqql.packets.Packet |
---|
getCommand, getHeader, getSequence, getSource, hash, isDuplicated, putBody, setDuplicated, setHeader, setSequence |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiskOutPacket(ByteBuffer buf, int length, QQUser user) throws PacketParseException
PacketParseException
public DiskOutPacket(char command, QQUser user)
Method Detail |
---|
protected void postFill(ByteBuffer buf, int startPos)
OutPacket
postFill
in class OutPacket
buf
- ByteBufferstartPos
- packet initial position
包起始ä½ç½®protected int getLength(int bodyLength)
Packet
getLength
in class Packet
bodyLength
- packet body length
包体长度
protected boolean validateHeader()
Packet
validateHeader
in class Packet
protected int getHeadLength()
getHeadLength
in class Packet
protected int getTailLength()
getTailLength
in class Packet
protected void putHead(ByteBuffer buf)
Packet
putHead
in class Packet
buf
- ByteBuffer object whicn packet need to write into
写入的ByteBuffer对象.protected byte[] getBodyBytes(ByteBuffer buf, int length)
Packet
getBodyBytes
in class Packet
buf
- ByteBufferlength
- packet total length
包总长度
public int getFamily()
getFamily
in class Packet
protected void putTail(ByteBuffer buf)
Packet
putTail
in class Packet
buf
- ByteBuffer object whicn packet need to write into
写入的ByteBuffer对象.protected byte[] encryptBody(byte[] b, int offset, int length)
Packet
encryptBody
in class Packet
b
- unencrypt byte array
æœªåŠ å¯†çš„å—节数组offset
- offset of packet body begin
包体开始的åç§»length
- packet body length
包体长度
protected byte[] decryptBody(byte[] body, int offset, int length)
Packet
decryptBody
in class Packet
body
- byte array of packet body
包体å—节数组offset
- offset of packet body begin
包体开始åç§»length
- packet length
包体长度
protected int getCryptographStart()
getCryptographStart
in class Packet
protected void parseHeader(ByteBuffer buf) throws PacketParseException
Packet
parseHeader
in class Packet
buf
- ByteBuffer
PacketParseException
- if parse error
如果解æžå‡ºé”™protected void parseTail(ByteBuffer buf) throws PacketParseException
Packet
parseTail
in class Packet
buf
- ByteBuffer
PacketParseException
- if parse error
如果解æžå‡ºé”™public int hashCode()
Packet
hashCode
in class Packet
public String getLocalIp()
public void setLocalIp(String localIp)
localIp
- the localIp to setpublic boolean equals(Object obj)
equals
in class Packet
|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |