mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 22:29:53 +01:00
Separated MessageHeader interface from Message interface.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package net.sf.briar.db;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
import net.sf.briar.api.protocol.AuthorId;
|
||||
import net.sf.briar.api.protocol.GroupId;
|
||||
import net.sf.briar.api.protocol.Message;
|
||||
@@ -49,14 +52,18 @@ class TestMessage implements Message {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
public int getLength() {
|
||||
return raw.length;
|
||||
}
|
||||
|
||||
public byte[] getBytes() {
|
||||
public byte[] getSerialisedBytes() {
|
||||
return raw;
|
||||
}
|
||||
|
||||
public InputStream getSerialisedStream() {
|
||||
return new ByteArrayInputStream(raw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof Message && id.equals(((Message)o).getId());
|
||||
|
||||
Reference in New Issue
Block a user