DataStructure, I2CPMessageBandwidthLimitsMessage, CreateLeaseSetMessage, CreateSessionMessage, DestLookupMessage, DestReplyMessage, DestroySessionMessage, DisconnectMessage, GetBandwidthLimitsMessage, GetDateMessage, HostLookupMessage, HostReplyMessage, MessagePayloadMessage, MessageStatusMessage, PoisonI2CPMessage, ReceiveMessageBeginMessage, ReceiveMessageEndMessage, ReconfigureSessionMessage, ReportAbuseMessage, RequestLeaseSetMessage, RequestVariableLeaseSetMessage, SendMessageMessage, SessionStatusMessage, SetDateMessagepublic abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPMessage
| コンストラクタ | 説明 |
|---|---|
I2CPMessageImpl() |
| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
protected abstract void |
doReadMessage(java.io.InputStream buf,
int size) |
Read in the payload part of the message (after the initial 4 byte size and 1
byte type)
|
protected abstract byte[] |
doWriteMessage() |
Write out the payload part of the message (not including the 4 byte size and
1 byte type)
|
void |
readBytes(java.io.InputStream in) |
Load up the current object with data from the given stream.
|
void |
readMessage(java.io.InputStream in) |
Validate the type and size of the message, and then read the message into the data structures.
|
void |
readMessage(java.io.InputStream in,
int length,
int type) |
Read the body into the data structures
|
SessionId |
sessionId() |
Return the SessionId for this type of message.
|
void |
writeBytes(java.io.OutputStream out) |
Write out the data structure to the stream, using the format defined in the
I2P data structure specification.
|
void |
writeMessage(java.io.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, toByteArraygetTypepublic void readMessage(java.io.InputStream in)
throws I2CPMessageException,
java.io.IOException
readMessage インタフェース内 I2CPMessagein - stream to read fromjava.io.IOExceptionI2CPMessageException - if the stream doesn't contain a valid message
that this class can read.public void readMessage(java.io.InputStream in,
int length,
int type)
throws I2CPMessageException,
java.io.IOException
readMessage インタフェース内 I2CPMessagelength - number of bytes in the message payloadin - stream to read fromtype - type of message (should equal getType())java.io.IOExceptionI2CPMessageException - if the stream doesn't contain a valid message
that this class can read.protected abstract void doReadMessage(java.io.InputStream buf,
int size)
throws I2CPMessageException,
java.io.IOException
buf - InputStreamsize - payload sizeI2CPMessageExceptionjava.io.IOExceptionprotected abstract byte[] doWriteMessage()
throws I2CPMessageException,
java.io.IOException
I2CPMessageExceptionjava.io.IOExceptionpublic void writeMessage(java.io.OutputStream out)
throws I2CPMessageException,
java.io.IOException
writeMessage インタフェース内 I2CPMessageout - OutputStreamjava.io.IOExceptionI2CPMessageException - if the current object doesn't have sufficient data
to write a properly formatted message.public void readBytes(java.io.InputStream in)
throws DataFormatException,
java.io.IOException
DataStructurereadBytes インタフェース内 DataStructurein - stream to read fromDataFormatException - if the data is improperly formattedjava.io.IOException - if there was a problem reading the streampublic void writeBytes(java.io.OutputStream out)
throws DataFormatException,
java.io.IOException
DataStructurewriteBytes インタフェース内 DataStructureout - stream to write toDataFormatException - if the data was incomplete or not yet ready to be writtenjava.io.IOException - if there was a problem writing to the streampublic SessionId sessionId()
sessionId インタフェース内 I2CPMessage