public class DeliveryInstructions extends DataStructureImpl
| Modifier and Type | Field and Description |
|---|---|
static int |
DELIVERY_MODE_DESTINATION |
static int |
DELIVERY_MODE_LOCAL |
static int |
DELIVERY_MODE_ROUTER |
static int |
DELIVERY_MODE_TUNNEL |
static DeliveryInstructions |
LOCAL
Immutable local instructions, no options
|
| Constructor and Description |
|---|
DeliveryInstructions() |
| Modifier and Type | Method and Description |
|---|---|
static DeliveryInstructions |
create(byte[] data,
int offset)
Returns immutable local instructions, or new
|
boolean |
equals(Object obj) |
int |
getDeliveryMode()
default -1
|
Hash |
getDestination()
default null
|
Hash |
getRouter()
default null
|
int |
getSize() |
TunnelId |
getTunnelId()
default null
|
int |
hashCode() |
int |
readBytes(byte[] data,
int offset) |
void |
setDeliveryMode(int mode) |
void |
setDestination(Hash dest)
required for DESTINATION
|
void |
setRouter(Hash router)
required for ROUTER or TUNNEL
|
void |
setTunnelId(TunnelId id)
required for TUNNEL
|
String |
toString() |
int |
writeBytes(byte[] target,
int offset) |
calculateHash, fromBase64, fromByteArray, read, toBase64, toByteArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitreadBytes, writeBytespublic static final int DELIVERY_MODE_DESTINATION
public static final int DELIVERY_MODE_LOCAL
public static final int DELIVERY_MODE_ROUTER
public static final int DELIVERY_MODE_TUNNEL
public static final DeliveryInstructions LOCAL
public static DeliveryInstructions create(byte[] data, int offset) throws DataFormatException
DataFormatExceptionpublic int getDeliveryMode()
public Hash getDestination()
public Hash getRouter()
public int getSize()
public TunnelId getTunnelId()
public int readBytes(byte[] data,
int offset)
throws DataFormatException
DataFormatExceptionpublic void setDeliveryMode(int mode)
mode - 0-3public void setDestination(Hash dest)
public void setRouter(Hash router)
public void setTunnelId(TunnelId id)
public int writeBytes(byte[] target,
int offset)