Moved some API classes into packages.

This commit is contained in:
akwizgran
2015-12-16 13:46:08 +00:00
parent 9fbdb08cf1
commit c5282c5b17
115 changed files with 408 additions and 430 deletions

View File

@@ -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();