DataStructure, I2NPMessageTunnelBuildMessage, TunnelBuildReplyMessagepublic abstract class TunnelBuildMessageBase extends I2NPMessageImpl
I2NPMessageImpl.Builder| 修飾子とタイプ | フィールド | 説明 |
|---|---|---|
protected EncryptedBuildRecord[] |
_records |
|
static int |
MAX_RECORD_COUNT |
|
protected int |
RECORD_COUNT |
|
static int |
RECORD_SIZE |
MAX_ID_VALUE, MAX_SIZE_context, _expiration, _log, _uniqueId, CHECKSUM_LENGTH, DEFAULT_EXPIRATION_MS, HEADER_LENGTH| 修飾子 | コンストラクタ | 説明 |
|---|---|---|
|
TunnelBuildMessageBase(I2PAppContext context) |
|
protected |
TunnelBuildMessageBase(I2PAppContext context,
int records) |
| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
protected int |
calculateWrittenLength() |
calculate the message body's length (not including the header and footer
|
EncryptedBuildRecord |
getRecord(int index) |
|
int |
getRecordCount() |
|
void |
readMessage(byte[] data,
int offset,
int dataSize,
int type) |
Read the body into the data structures, after the initial type byte and
the uniqueId / expiration, using the current class's format as defined by
the I2NP specification
|
void |
setRecord(int index,
EncryptedBuildRecord record) |
|
protected int |
writeMessageBody(byte[] out,
int curIndex) |
write the message body to the output array, starting at the given index.
|
calculateHash, fromBase64, fromByteArray, toBase64calculateHash, fromBase64, fromByteArray, read, toBase64getTypecreateMessage, fromRawByteArray, getMessageExpiration, getMessageSize, getRawMessageSize, getUniqueId, readBytes, readBytes, readBytes, readBytes, readMessage, registerBuilder, setMessageExpiration, setUniqueId, toByteArray, toByteArray, toRawByteArray, writeBytesprotected EncryptedBuildRecord[] _records
protected int RECORD_COUNT
public static final int MAX_RECORD_COUNT
public static final int RECORD_SIZE
public TunnelBuildMessageBase(I2PAppContext context)
protected TunnelBuildMessageBase(I2PAppContext context, int records)
public void setRecord(int index,
EncryptedBuildRecord record)
public EncryptedBuildRecord getRecord(int index)
public int getRecordCount()
protected int calculateWrittenLength()
I2NPMessageImplcalculateWrittenLength クラス内 I2NPMessageImplpublic void readMessage(byte[] data,
int offset,
int dataSize,
int type)
throws I2NPMessageException
I2NPMessagedata - data to read fromoffset - where to start in the data arraydataSize - how long into the data to readtype - I2NP message typeI2NPMessageException - if the stream doesn't contain a valid message
that this class can read.protected int writeMessageBody(byte[] out,
int curIndex)
throws I2NPMessageException
I2NPMessageImplwriteMessageBody クラス内 I2NPMessageImplI2NPMessageException