mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
Moved some API classes into packages.
This commit is contained in:
@@ -1,39 +1,34 @@
|
||||
package org.briarproject;
|
||||
|
||||
import org.briarproject.api.Author;
|
||||
import org.briarproject.api.identity.Author;
|
||||
import org.briarproject.api.sync.Group;
|
||||
import org.briarproject.api.sync.Message;
|
||||
import org.briarproject.api.sync.MessageId;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class TestMessage implements Message {
|
||||
|
||||
private final MessageId id, parent;
|
||||
private final Group group;
|
||||
private final Author author;
|
||||
private final String contentType, subject;
|
||||
private final String contentType;
|
||||
private final long timestamp;
|
||||
private final byte[] raw;
|
||||
private final int bodyStart, bodyLength;
|
||||
|
||||
public TestMessage(MessageId id, MessageId parent, Group group,
|
||||
Author author, String contentType, String subject, long timestamp,
|
||||
byte[] raw) {
|
||||
this(id, parent, group, author, contentType, subject, timestamp, raw, 0,
|
||||
Author author, String contentType, long timestamp, byte[] raw) {
|
||||
this(id, parent, group, author, contentType, timestamp, raw, 0,
|
||||
raw.length);
|
||||
}
|
||||
|
||||
public TestMessage(MessageId id, MessageId parent, Group group,
|
||||
Author author, String contentType, String subject, long timestamp,
|
||||
byte[] raw, int bodyStart, int bodyLength) {
|
||||
Author author, String contentType, long timestamp, byte[] raw,
|
||||
int bodyStart, int bodyLength) {
|
||||
this.id = id;
|
||||
this.parent = parent;
|
||||
this.group = group;
|
||||
this.author = author;
|
||||
this.contentType = contentType;
|
||||
this.subject = subject;
|
||||
this.timestamp = timestamp;
|
||||
this.raw = raw;
|
||||
this.bodyStart = bodyStart;
|
||||
@@ -60,10 +55,6 @@ public class TestMessage implements Message {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
public String getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
public long getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
@@ -80,10 +71,6 @@ public class TestMessage implements Message {
|
||||
return bodyLength;
|
||||
}
|
||||
|
||||
public InputStream getSerialisedStream() {
|
||||
return new ByteArrayInputStream(raw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return id.hashCode();
|
||||
|
||||
Reference in New Issue
Block a user