|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.data.DataStructureImpl
net.i2p.data.i2np.DeliveryInstructions
public class DeliveryInstructions
Contains the delivery instructions for garlic cloves. Generic "delivery instructions" are used both in tunnel messages and in garlic cloves, with slight differences. However, the tunnel message generator TrivialPreprocessor and reader FragmentHandler do not use this class, the reading and writing is handled inline there.
Field Summary | |
---|---|
static int |
DELIVERY_MODE_DESTINATION
|
static int |
DELIVERY_MODE_LOCAL
|
static int |
DELIVERY_MODE_ROUTER
|
static int |
DELIVERY_MODE_TUNNEL
|
Constructor Summary | |
---|---|
DeliveryInstructions()
|
Method Summary | |
---|---|
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 |
Methods inherited from class net.i2p.data.DataStructureImpl |
---|
calculateHash, fromBase64, fromByteArray, read, toBase64, toByteArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public DeliveryInstructions()
Method Detail |
---|
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 from
DataFormatException
- if the data is improperly formatted
IOException
- 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 to
DataFormatException
- if the data was incomplete or not yet ready to be written
IOException
- if there was a problem writing to the streampublic int writeBytes(byte[] target, int offset)
public int getSize()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |