Methods Summary |
---|
public com.aelitis.azureus.core.peermanager.messaging.Message | deserialize(org.gudy.azureus2.core3.util.DirectByteBuffer data, byte version)
Map payload = MessagingUtil.convertBencodedByteStreamToPayload( data, 1, getID() );
int piece_number = ((Long)payload.get( "piece")).intValue();
AZBadPiece message = new AZBadPiece( piece_number, version );
return( message );
|
public void | destroy()
if ( buffer != null ){
buffer.returnToPool();
}
|
public org.gudy.azureus2.core3.util.DirectByteBuffer[] | getData()
if ( buffer == null ){
Map map = new HashMap();
map.put( "piece", new Long( piece_number ));
buffer = MessagingUtil.convertPayloadToBencodedByteStream( map, DirectByteBuffer.AL_MSG );
}
return new DirectByteBuffer[]{ buffer };
|
public java.lang.String | getDescription()
return( getID() + " " + piece_number );
|
public java.lang.String | getFeatureID()
return( AZMessage.AZ_FEATURE_ID );
|
public int | getFeatureSubID()
return( AZMessage.SUBID_ID_AZ_BAD_PIECE );
|
public java.lang.String | getID()
return( AZMessage.ID_AZ_BAD_PIECE );
|
public byte[] | getIDBytes()
return( AZMessage.ID_AZ_BAD_PIECE_BYTES );
|
public int | getPieceNumber()
return( piece_number );
|
public int | getType()
return( Message.TYPE_PROTOCOL_PAYLOAD );
|
public byte | getVersion() return version;
|