mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Update data format to match BDF spec.
This commit is contained in:
@@ -2,7 +2,7 @@ package org.briarproject.api.data;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface Reader {
|
||||
public interface BdfReader {
|
||||
|
||||
boolean eof() throws IOException;
|
||||
void close() throws IOException;
|
||||
@@ -40,9 +40,9 @@ public interface Reader {
|
||||
void readListEnd() throws IOException;
|
||||
void skipList() throws IOException;
|
||||
|
||||
boolean hasMap() throws IOException;
|
||||
void readMapStart() throws IOException;
|
||||
boolean hasMapEnd() throws IOException;
|
||||
void readMapEnd() throws IOException;
|
||||
void skipMap() throws IOException;
|
||||
boolean hasDictionary() throws IOException;
|
||||
void readDictionaryStart() throws IOException;
|
||||
boolean hasDictionaryEnd() throws IOException;
|
||||
void readDictionaryEnd() throws IOException;
|
||||
void skipDictionary() throws IOException;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.briarproject.api.data;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
public interface BdfReaderFactory {
|
||||
|
||||
BdfReader createReader(InputStream in);
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public interface Writer {
|
||||
public interface BdfWriter {
|
||||
|
||||
void flush() throws IOException;
|
||||
void close() throws IOException;
|
||||
@@ -23,7 +23,7 @@ public interface Writer {
|
||||
void writeListStart() throws IOException;
|
||||
void writeListEnd() throws IOException;
|
||||
|
||||
void writeMap(Map<?, ?> m) throws IOException;
|
||||
void writeMapStart() throws IOException;
|
||||
void writeMapEnd() throws IOException;
|
||||
void writeDictionary(Map<?, ?> m) throws IOException;
|
||||
void writeDictionaryStart() throws IOException;
|
||||
void writeDictionaryEnd() throws IOException;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.briarproject.api.data;
|
||||
|
||||
import java.io.OutputStream;
|
||||
|
||||
public interface BdfWriterFactory {
|
||||
|
||||
BdfWriter createWriter(OutputStream out);
|
||||
}
|
||||
@@ -4,5 +4,5 @@ import java.io.IOException;
|
||||
|
||||
public interface ObjectReader<T> {
|
||||
|
||||
T readObject(Reader r) throws IOException;
|
||||
T readObject(BdfReader r) throws IOException;
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package org.briarproject.api.data;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
public interface ReaderFactory {
|
||||
|
||||
Reader createReader(InputStream in);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package org.briarproject.api.data;
|
||||
|
||||
import java.io.OutputStream;
|
||||
|
||||
public interface WriterFactory {
|
||||
|
||||
Writer createWriter(OutputStream out);
|
||||
}
|
||||
Reference in New Issue
Block a user