java.lang.Object
net.i2p.router.transport.udp.SSU2Payload.Block
net.i2p.router.transport.udp.SSU2Payload.OptionsBlock
- Enclosing class:
SSU2Payload
Block containing session options. Used to negotiate session parameters.
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionintReturn the options data length.intwriteData(byte[] tgt, int off) Write the options block data to the target array.Methods inherited from class SSU2Payload.Block
getTotalLength, getType, toString, write
Field Details
opts
private final byte[] optsThe advertised option bytes.
Constructor Details
OptionsBlock
public OptionsBlock(byte[] options) Create an options block.- Parameters:
options- the option data
Method Details
getDataLength
public int getDataLength()Return the options data length.- Specified by:
getDataLengthin classSSU2Payload.Block- Returns:
- the options data length
writeData
public int writeData(byte[] tgt, int off) Write the options block 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