Serializable, DataStructure, I2CPMessagepublic class SendMessageExpiresMessage extends SendMessageMessage
| Modifier and Type | Field | Description |
|---|---|---|
static int |
MESSAGE_TYPE |
_destination, _nonce, _payload, _sessionId| Constructor | Description |
|---|---|
SendMessageExpiresMessage() |
|
SendMessageExpiresMessage(DateAndFlags options) |
| Modifier and Type | Method | 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(long d) |
|
void |
setExpiration(Date 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.
|
calculateHash, fromBase64, fromByteArray, toBase64, toByteArraycalculateHash, fromBase64, fromByteArray, read, toBase64, toByteArrayreadBytes, readMessage, writeBytesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdoReadMessage, doWriteMessage, getDestination, getNonce, getPayload, getSessionId, sessionId, setDestination, setNonce, setPayload, setSessionIdpublic 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 I2CPMessagereadMessage in class SendMessageMessagein - stream to read fromlength - number of bytes in the message payloadtype - type of message (should equal getType())IOExceptionI2CPMessageException - 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 I2CPMessagewriteMessage in class SendMessageMessageout - OutputStreamIOExceptionI2CPMessageException - if the current object doesn't have sufficient data
to write a properly formatted message.public int getType()
I2CPMessagegetType in interface I2CPMessagegetType in class SendMessageMessagepublic String toString()
toString in class SendMessageMessage