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();
int offset = ((Long)payload.get( "offset")).intValue();
int length = ((Long)payload.get( "length")).intValue();
int life = ((Long)payload.get( "life" )).intValue();
return( new AZRequestHint( piece_number, offset, length, life, version ));
|
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 ));
map.put( "offset", new Long( offset ));
map.put( "length", new Long( length ));
map.put( "life", new Long( life ));
buffer = MessagingUtil.convertPayloadToBencodedByteStream( map, DirectByteBuffer.AL_MSG );
}
return new DirectByteBuffer[]{ buffer };
|
public java.lang.String | getDescription()
return( getID() + " piece #" + piece_number + ":" + offset + "->" + (offset + length -1) + "/" + life );
|
public java.lang.String | getFeatureID()
return( AZMessage.AZ_FEATURE_ID );
|
public int | getFeatureSubID()
return( AZMessage.SUBID_ID_AZ_REQUEST_HINT );
|
public java.lang.String | getID()
return( AZMessage.ID_AZ_REQUEST_HINT );
|
public byte[] | getIDBytes()
return( AZMessage.ID_AZ_REQUEST_HINT_BYTES );
|
public int | getLength()
return( length );
|
public int | getLife()
return( life );
|
public int | getOffset()
return( offset );
|
public int | getPieceNumber()
return( piece_number );
|
public int | getType()
return( Message.TYPE_PROTOCOL_PAYLOAD );
|
public byte | getVersion() return version;
|