public class SendMessageExpiresMessage extends SendMessageMessage
Modifier and Type | Field and Description |
---|---|
static int |
MESSAGE_TYPE |
_destination, _nonce, _payload, _sessionId
Constructor and Description |
---|
SendMessageExpiresMessage() |
SendMessageExpiresMessage(DateAndFlags options) |
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() |
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) |
void |
setFlags(int f) |
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, sessionId, setDestination, setNonce, setPayload, setSessionId
readBytes, readMessage, writeBytes
calculateHash, fromBase64, fromByteArray, read, toBase64, toByteArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
calculateHash, fromBase64, fromByteArray, toBase64, toByteArray
public static final int MESSAGE_TYPE
public SendMessageExpiresMessage()
public SendMessageExpiresMessage(DateAndFlags options)
public Date getExpiration()
public long getExpirationTime()
public void setExpiration(Date d)
public void setExpiration(long d)
public int getFlags()
public void setFlags(int f)
public void readMessage(InputStream in, int length, int type) throws I2CPMessageException, IOException
readMessage
in interface I2CPMessage
readMessage
in class SendMessageMessage
in
- stream to read fromlength
- number of bytes in the message payloadtype
- type of message (should equal getType())IOException
I2CPMessageException
- if the stream doesn't contain a valid message
that this class can read.public void writeMessage(OutputStream out) throws I2CPMessageException, IOException
writeMessage
in interface I2CPMessage
writeMessage
in class SendMessageMessage
out
- OutputStreamIOException
I2CPMessageException
- if the current object doesn't have sufficient data
to write a properly formatted message.public int getType()
I2CPMessage
getType
in interface I2CPMessage
getType
in class SendMessageMessage
public String toString()
toString
in class SendMessageMessage