public static class SSU2Payload.RIBlock extends SSU2Payload.Block
| Constructor and Description |
|---|
RIBlock(byte[] ridata,
boolean flood,
boolean gzipped)Create a complete (non-fragmented) RouterInfo block. |
RIBlock(byte[] ridata,
int off,
int len,
boolean flood,
boolean gzipped,
int frag,
int total)Create a fragment of a RouterInfo block. |
| Modifier and Type | Method and Description |
|---|---|
int | getDataLength()Return the data length including the 2 byte header. |
int | writeData(byte[] tgt,
int off)Write the RouterInfo block data to the target array. |
getTotalLength, getType, toString, writepublic RIBlock(byte[] ridata,
boolean flood,
boolean gzipped)ridata - the raw RouterInfo dataflood - true if this is a floodfill routergzipped - true if data is gzippedpublic RIBlock(byte[] ridata,
int off,
int len,
boolean flood,
boolean gzipped,
int frag,
int total)ridata - the raw RouterInfo dataoff - offset in the datalen - length of the fragmentflood - true if this is a floodfill routergzipped - true if data is gzippedfrag - fragment number (0-based)total - total number of fragmentspublic int getDataLength()
getDataLength in class SSU2Payload.Blockpublic int writeData(byte[] tgt,
int off)writeData in class SSU2Payload.Blocktgt - target array to write tooff - offset in the target array