java.lang.Object
net.i2p.router.transport.udp.SSU2Payload.Block
net.i2p.router.transport.udp.SSU2Payload.RelayResponseBlock
- Enclosing class:
SSU2Payload
Block containing relay response data. Used to respond to relay requests.
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionintThe data length of this block.intwriteData(byte[] tgt, int off) Write this block's data to the target array.Methods inherited from class SSU2Payload.Block
getTotalLength, getType, toString, write
Field Details
d
private final byte[] dThe relay response payload.
Constructor Details
RelayResponseBlock
public RelayResponseBlock(byte[] data) Wrap relay response data as a block.- Parameters:
data- the response bytes, which must be copied out
Method Details
getDataLength
public int getDataLength()The data length of this block.- Specified by:
getDataLengthin classSSU2Payload.Block- Returns:
- the data length
writeData
public int writeData(byte[] tgt, int off) Write this block's data to the target array.- Specified by:
writeDatain classSSU2Payload.Block- Parameters:
tgt- target array to write tooff- offset in the target array- Returns:
- the new offset after writing