public abstract class TunnelBuildMessageBase extends I2NPMessageImpl
I2NPMessageImpl.Builder| Modifier and Type | Field and Description |
|---|---|
protected EncryptedBuildRecord[] | _recordsDescription. |
static int | MAX_RECORD_COUNTMAX_RECORD_COUNT. |
protected int | RECORD_COUNTRECORD_COUNT. |
static int | RECORD_SIZEDescription. |
_context, _expiration, _log, CHECKSUM_LENGTH, DEFAULT_EXPIRATION_MS, HEADER_LENGTHMAX_ID_VALUE, MAX_SIZE| Modifier | Constructor and Description |
|---|---|
| TunnelBuildMessageBase(I2PAppContext context)TunnelBuildMessageBase. |
protected | TunnelBuildMessageBase(I2PAppContext context,
int records) |
| Modifier and Type | Method and Description |
|---|---|
protected int | calculateWrittenLength()calculateWrittenLength. |
EncryptedBuildRecord | getRecord(int index) |
int | getRecordCount() |
void | readMessage(byte[] data,
int offset,
int dataSize,
int type)readMessage. |
void | setRecord(int index,
EncryptedBuildRecord record) |
protected int | writeMessageBody(byte[] out,
int curIndex)writeMessageBody. |
createMessage, fromRawByteArray, fromRawByteArrayNTCP2, getMessageExpiration, getMessageSize, getRawMessageSize, getUniqueId, getUniqueId, readBytes, readBytes, readMessage, setMessageExpiration, setUniqueId, toByteArray, toByteArray, toByteArray, toRawByteArray, toRawByteArrayNTCP2clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeprotected EncryptedBuildRecord[] _records
public static final int MAX_RECORD_COUNT
protected int RECORD_COUNT
public static final int RECORD_SIZE
public TunnelBuildMessageBase(I2PAppContext context)
protected TunnelBuildMessageBase(I2PAppContext context, int records)
protected int calculateWrittenLength()
calculateWrittenLength in class I2NPMessageImplpublic EncryptedBuildRecord getRecord(int index)
index - the indexpublic int getRecordCount()
public void readMessage(byte[] data,
int offset,
int dataSize,
int type)
throws I2NPMessageExceptiondata - 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.public void setRecord(int index,
EncryptedBuildRecord record)record - may be nullindex - the indexprotected int writeMessageBody(byte[] out,
int curIndex)
throws I2NPMessageExceptionwriteMessageBody in class I2NPMessageImplI2NPMessageException