Read and write offers. Mostly boilerplate.

This commit is contained in:
akwizgran
2011-07-26 22:00:39 +01:00
parent 9e78837055
commit 0cf8477504
12 changed files with 156 additions and 16 deletions

View File

@@ -5,6 +5,7 @@ import java.util.Map;
import net.sf.briar.api.protocol.Tags;
import net.sf.briar.api.protocol.Transports;
import net.sf.briar.api.serial.Consumer;
import net.sf.briar.api.serial.ObjectReader;
import net.sf.briar.api.serial.Reader;
@@ -21,7 +22,7 @@ class TransportReader implements ObjectReader<Transports> {
public Transports readObject(Reader r) throws IOException {
// Initialise the consumer
CountingConsumer counting = new CountingConsumer(Transports.MAX_SIZE);
Consumer counting = new CountingConsumer(Transports.MAX_SIZE);
// Read the data
r.addConsumer(counting);
r.readUserDefinedTag(Tags.TRANSPORTS);