* I2NP: Allow message to be written more than once,

instead of throwing an IllegalStateException
This commit is contained in:
zzz
2010-12-02 18:12:38 +00:00
parent 8f8fb0e5cb
commit 5ba101063a
6 changed files with 3 additions and 44 deletions

View File

@ -37,7 +37,6 @@ public class UnknownI2NPMessage extends I2NPMessageImpl {
/** warning - only public for equals() */
public byte[] getData() {
verifyUnwritten();
return _data;
}
@ -62,7 +61,6 @@ public class UnknownI2NPMessage extends I2NPMessageImpl {
/** write the message body to the output array, starting at the given index */
protected int writeMessageBody(byte out[], int curIndex) {
verifyUnwritten();
if (_data == null) {
out[curIndex++] = 0x0;
out[curIndex++] = 0x0;
@ -78,12 +76,6 @@ public class UnknownI2NPMessage extends I2NPMessageImpl {
return curIndex;
}
@Override
protected void written() {
super.written();
_data = null;
}
/** @return 0-255 */
public int getType() { return _type; }