java.lang.Object
net.i2p.router.transport.udp.SSU2Payload.Block
net.i2p.router.transport.udp.SSU2Payload.FirstFragBlock
- Enclosing class:
SSU2Payload
Same format as I2NPBlock.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate OutboundMessageStateThe message state being tracked, if any.Constructor Summary
ConstructorsMethod Summary
Public MethodsModifier and TypeMethodDescriptionintReturn the fragment size including the 9 byte header.(package private) voidRepurpose this block for a new message.intwriteData(byte[] tgt, int off) Write the first fragment block data to the target array.Methods inherited from class SSU2Payload.Block
getTotalLength, getType, toString, write
Field Details
m
The message state being tracked, if any.
Constructor Details
FirstFragBlock
Create a first fragment block.- Parameters:
msg- the outbound message state
Method Details
setMessage
Repurpose this block for a new message. Only for pooling.- Parameters:
msg- the outbound message state
getDataLength
public int getDataLength()Return the fragment size including the 9 byte header.- Specified by:
getDataLengthin classSSU2Payload.Block- Returns:
- the fragment data length
writeData
public int writeData(byte[] tgt, int off) Write the first fragment 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