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 |
---|---|
boolean |
equals(Object obj) |
boolean |
getDelayRequested()
Deprecated.
unused
|
long |
getDelaySeconds()
Deprecated.
unused
|
int |
getDeliveryMode()
default -1
|
Hash |
getDestination()
default null
|
boolean |
getEncrypted()
Deprecated.
unused
|
SessionKey |
getEncryptionKey()
Deprecated.
unused
|
Hash |
getRouter()
default null
|
int |
getSize() |
TunnelId |
getTunnelId()
default null
|
int |
hashCode() |
int |
readBytes(byte[] data,
int offset) |
void |
readBytes(InputStream in)
Deprecated.
unused
|
void |
setDelayRequested(boolean req)
Deprecated.
unused
|
void |
setDelaySeconds(long seconds)
Deprecated.
unused
|
void |
setDeliveryMode(int mode) |
void |
setDestination(Hash dest)
required for DESTINATION
|
void |
setEncrypted(boolean encrypted)
Deprecated.
unused
|
void |
setEncryptionKey(SessionKey key)
Deprecated.
unused
|
void |
setRouter(Hash router)
required for ROUTER or TUNNEL
|
void |
setTunnelId(TunnelId id)
required for TUNNEL
|
String |
toString() |
int |
writeBytes(byte[] target,
int offset) |
void |
writeBytes(OutputStream out)
Deprecated.
unused
|
calculateHash, fromBase64, fromByteArray, read, toBase64, toByteArray
public static final int DELIVERY_MODE_LOCAL
public static final int DELIVERY_MODE_DESTINATION
public static final int DELIVERY_MODE_ROUTER
public static final int DELIVERY_MODE_TUNNEL
public static final DeliveryInstructions LOCAL
public boolean getEncrypted()
public void setEncrypted(boolean encrypted)
public SessionKey getEncryptionKey()
public void setEncryptionKey(SessionKey key)
public int getDeliveryMode()
public void setDeliveryMode(int mode)
mode
- 0-3public Hash getDestination()
public void setDestination(Hash dest)
public Hash getRouter()
public void setRouter(Hash router)
public TunnelId getTunnelId()
public void setTunnelId(TunnelId id)
public boolean getDelayRequested()
public void setDelayRequested(boolean req)
public long getDelaySeconds()
public void setDelaySeconds(long seconds)
public void readBytes(InputStream in) throws DataFormatException, IOException
DataStructure
in
- stream to read fromDataFormatException
- if the data is improperly formattedIOException
- if there was a problem reading the streampublic int readBytes(byte[] data, int offset) throws DataFormatException
DataFormatException
public void writeBytes(OutputStream out) throws DataFormatException, IOException
DataStructure
out
- stream to write toDataFormatException
- if the data was incomplete or not yet ready to be writtenIOException
- if there was a problem writing to the streampublic int writeBytes(byte[] target, int offset)
public int getSize()