public class Datagram3 extends Object
+----+----+----+----+----+----+----+----+ | | + fromHash + | | + + | | +----+----+----+----+----+----+----+----+ | flags | options (optional) | +----+----+ + ~ ~ ~ ~ +----+----+----+----+----+----+----+----+ | | ~ payload ~ ~ ~ | | +----+----+----+----+----+----+----+----+
Modifier and Type | Method and Description |
---|---|
Properties |
getOptions()
Get the options of an I2P repliable datagram (previously loaded with the
load() method), if any
|
byte[] |
getPayload()
Get the payload carried by an I2P repliable datagram (previously loaded
with the load() method)
|
Hash |
getSender()
Get the sender of an I2P repliable datagram (previously loaded with the
load() method)
|
static Datagram3 |
load(I2PAppContext ctx,
I2PSession session,
byte[] dgram)
Load an I2P repliable datagram3.
|
static byte[] |
make(I2PAppContext ctx,
I2PSession session,
byte[] payload)
Make a repliable I2P datagram3 containing the specified payload.
|
static byte[] |
make(I2PAppContext ctx,
I2PSession session,
byte[] payload,
Properties options)
Make a repliable I2P datagram3 containing the specified payload.
|
public static byte[] make(I2PAppContext ctx, I2PSession session, byte[] payload) throws DataFormatException
payload
- non-null Bytes to be contained in the I2P datagram.DataFormatException
- if payload is too bigpublic static byte[] make(I2PAppContext ctx, I2PSession session, byte[] payload, Properties options) throws DataFormatException
payload
- non-null Bytes to be contained in the I2P datagram.options
- may be nullDataFormatException
- if payload is too bigpublic static Datagram3 load(I2PAppContext ctx, I2PSession session, byte[] dgram) throws DataFormatException
dgram
- non-null I2P repliable datagram to be loadedDataFormatException
- If there is an error in the datagram formatpublic byte[] getPayload()
public Hash getSender()
public Properties getOptions()