Implemented OfferWriter and RequestWriter, made all the writers

reusable (though not thread-safe), and guiced the readers.
This commit is contained in:
akwizgran
2011-07-26 21:36:55 +01:00
parent 426e415676
commit 9e78837055
23 changed files with 249 additions and 46 deletions

View File

@@ -16,6 +16,8 @@ public interface Tags {
static final int GROUP_ID = 6;
static final int MESSAGE = 7;
static final int MESSAGE_ID = 8;
static final int SUBSCRIPTIONS = 9;
static final int TRANSPORTS = 10;
static final int OFFER = 9;
static final int REQUEST = 10;
static final int SUBSCRIPTIONS = 11;
static final int TRANSPORTS = 12;
}

View File

@@ -8,6 +8,10 @@ public interface PacketWriterFactory {
BatchWriter createBatchWriter(OutputStream out);
OfferWriter createOfferWriter(OutputStream out);
RequestWriter createRequestWriter(OutputStream out);
SubscriptionWriter createSubscriptionWriter(OutputStream out);
TransportWriter createTransportWriter(OutputStream out);

View File

@@ -7,5 +7,5 @@ import java.util.BitSet;
public interface RequestWriter {
/** Writes the contents of the request. */
void writeBitmap(BitSet b) throws IOException;
void writeBitmap(BitSet b, int length) throws IOException;
}