public class SendMessageExpiresMessage extends SendMessageMessage
| Modifier and Type | Field and Description |
|---|---|
static int |
MESSAGE_TYPE |
_destination, _nonce, _payload, _sessionId| Constructor and Description |
|---|
SendMessageExpiresMessage()
For reading.
|
SendMessageExpiresMessage(SessionId sessID,
Destination dest,
Payload payload,
long nonce)
For writing
|
SendMessageExpiresMessage(SessionId sessID,
Destination dest,
Payload payload,
long nonce,
DateAndFlags options)
For writing
|
| Modifier and Type | Method and Description |
|---|---|
Date |
getExpiration()
The Date object is created here, it is not cached.
|
long |
getExpirationTime()
Use this instead of getExpiration().getTime()
|
int |
getFlags()
Gets the message flags.
|
int |
getType()
Return the unique identifier for this type of message, as specified in the
network specification document under #ClientAccessLayerMessages
|
void |
readMessage(InputStream in,
int length,
int type)
Read the body into the data structures
|
void |
setExpiration(Date d) |
void |
setExpiration(long d)
Sets the message expiration time.
|
void |
setFlags(int f)
Sets the message flags.
|
String |
toString() |
void |
writeMessage(OutputStream out)
Write out the full message to the stream, including the 4 byte size and 1
byte type header.
|
doReadMessage, doWriteMessage, getDestination, getNonce, getPayload, getSessionId, sessionIdreadBytes, readMessage, writeBytespublic static final int MESSAGE_TYPE
public SendMessageExpiresMessage()
public SendMessageExpiresMessage(SessionId sessID, Destination dest, Payload payload, long nonce)
public SendMessageExpiresMessage(SessionId sessID, Destination dest, Payload payload, long nonce, DateAndFlags options)
public Date getExpiration()
public long getExpirationTime()
public int getFlags()
public int getType()
I2CPMessagegetType in interface I2CPMessagegetType in class SendMessageMessagepublic void readMessage(InputStream in, int length, int type) throws I2CPMessageException, IOException
readMessage in interface I2CPMessagereadMessage in class SendMessageMessagein - stream to read fromlength - number of bytes in the message payloadtype - type of message (should equal getType())IOException - if there's an error reading from the streamI2CPMessageException - if the stream doesn't contain a valid message
that this class can read.public void setExpiration(Date d)
public void setExpiration(long d)
public void setFlags(int f)
public String toString()
toString in class SendMessageMessagepublic void writeMessage(OutputStream out) throws I2CPMessageException, IOException
writeMessage in interface I2CPMessagewriteMessage in class SendMessageMessageout - OutputStreamIOException - if there's an error writing to the streamI2CPMessageException - if the current object doesn't have sufficient data
to write a properly formatted message.