mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Minor changes to serialisation library (mostly renaming).
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
package net.sf.briar.api.serial;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface ObjectReader<T> {
|
||||
|
||||
T readObject(Reader r) throws IOException;
|
||||
}
|
||||
@@ -18,8 +18,8 @@ public interface Reader {
|
||||
void addConsumer(Consumer c);
|
||||
void removeConsumer(Consumer c);
|
||||
|
||||
void addObjectReader(int id, ObjectReader<?> o);
|
||||
void removeObjectReader(int id);
|
||||
void addStructReader(int id, StructReader<?> o);
|
||||
void removeStructReader(int id);
|
||||
|
||||
boolean hasBoolean() throws IOException;
|
||||
boolean readBoolean() throws IOException;
|
||||
@@ -51,7 +51,6 @@ public interface Reader {
|
||||
byte[] readBytes(int maxLength) throws IOException;
|
||||
|
||||
boolean hasList() throws IOException;
|
||||
List<Object> readList() throws IOException;
|
||||
<E> List<E> readList(Class<E> e) throws IOException;
|
||||
boolean hasListStart() throws IOException;
|
||||
void readListStart() throws IOException;
|
||||
@@ -59,7 +58,6 @@ public interface Reader {
|
||||
void readListEnd() throws IOException;
|
||||
|
||||
boolean hasMap() throws IOException;
|
||||
Map<Object, Object> readMap() throws IOException;
|
||||
<K, V> Map<K, V> readMap(Class<K> k, Class<V> v) throws IOException;
|
||||
boolean hasMapStart() throws IOException;
|
||||
void readMapStart() throws IOException;
|
||||
|
||||
8
api/net/sf/briar/api/serial/StructReader.java
Normal file
8
api/net/sf/briar/api/serial/StructReader.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package net.sf.briar.api.serial;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface StructReader<T> {
|
||||
|
||||
T readStruct(Reader r) throws IOException;
|
||||
}
|
||||
Reference in New Issue
Block a user