net.i2p.data.i2np
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 |
Constructor and Description |
---|
DeliveryInstructions() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
getDelayRequested() |
long |
getDelaySeconds() |
int |
getDeliveryMode() |
Hash |
getDestination() |
boolean |
getEncrypted() |
SessionKey |
getEncryptionKey() |
Hash |
getRouter() |
int |
getSize() |
TunnelId |
getTunnelId() |
int |
hashCode() |
int |
readBytes(byte[] data,
int offset) |
void |
readBytes(InputStream in)
Load up the current object with data from the given stream.
|
void |
setDelayRequested(boolean req) |
void |
setDelaySeconds(long seconds) |
void |
setDeliveryMode(int mode) |
void |
setDestination(Hash dest) |
void |
setEncrypted(boolean encrypted) |
void |
setEncryptionKey(SessionKey key) |
void |
setRouter(Hash router) |
void |
setTunnelId(TunnelId id) |
String |
toString() |
int |
writeBytes(byte[] target,
int offset)
return the number of bytes written to the target
|
void |
writeBytes(OutputStream out)
Write out the data structure to the stream, using the format defined in the
I2P data structure specification.
|
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 boolean getEncrypted()
public void setEncrypted(boolean encrypted)
public SessionKey getEncryptionKey()
public void setEncryptionKey(SessionKey key)
public int getDeliveryMode()
public void setDeliveryMode(int mode)
public 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()