jBittorrentAPI
Class Message_PP
java.lang.Object
jBittorrentAPI.Message
jBittorrentAPI.Message_PP
public class Message_PP
- extends Message
Represent a Peer Protocol message according to Bittorrent protocol specifications.
This message format depends on its identity, so refer to Bittorrent specifications for further information
Field Summary |
private byte[] |
id
|
private byte[] |
length
|
private byte[] |
payload
|
Fields inherited from class jBittorrentAPI.Message |
type |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
id
private byte[] id
length
private byte[] length
payload
private byte[] payload
Message_PP
public Message_PP()
Message_PP
public Message_PP(int type)
Message_PP
public Message_PP(int type,
byte[] payload)
Message_PP
public Message_PP(int type,
byte[] payload,
int p)
Message_PP
public Message_PP(int type,
int p)
generate
public byte[] generate()
- Specified by:
generate
in class Message
getID
public byte[] getID()
getLength
public byte[] getLength()
getPayload
public byte[] getPayload()
setData
public void setData(byte[] length,
byte id,
byte[] payload)
setData
public void setData(int type)
setData
public void setData(int type,
byte[] payload)
setID
public void setID(int id)
setLength
public void setLength(byte[] length)
setPayload
public void setPayload(byte[] payload)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object