jBittorrentAPI
Class Message_PP

java.lang.Object
  extended by jBittorrentAPI.Message
      extended by 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
 
Constructor Summary
Message_PP()
           
Message_PP(int type)
           
Message_PP(int type, byte[] payload)
           
Message_PP(int type, byte[] payload, int p)
           
Message_PP(int type, int p)
           
 
Method Summary
 byte[] generate()
           
 byte[] getID()
           
 byte[] getLength()
           
 byte[] getPayload()
           
 void setData(byte[] length, byte id, byte[] payload)
           
 void setData(int type)
           
 void setData(int type, byte[] payload)
           
 void setID(int id)
           
 void setLength(byte[] length)
           
 void setPayload(byte[] payload)
           
 java.lang.String toString()
           
 
Methods inherited from class jBittorrentAPI.Message
getPriority, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private byte[] id

length

private byte[] length

payload

private byte[] payload
Constructor Detail

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)
Method Detail

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