Files
briar/api/net/sf/briar/api/protocol/BatchWriter.java
akwizgran de648daca5 Bundles are gone - the batch-mode and stream-mode protocols now
consist of independently encrypted and authenticated packets (Ack,
Batch, Subscriptions and Transports so far).
2011-07-22 22:19:24 +01:00

20 lines
490 B
Java

package net.sf.briar.api.protocol;
import java.io.IOException;
/** An interface for creating a batch of messages. */
public interface BatchWriter {
/** Returns the capacity of the batch in bytes. */
int getCapacity();
/**
* Attempts to add the given raw message to the batch and returns true if
* it was added.
*/
boolean addMessage(byte[] raw) throws IOException;
/** Finishes writing the batch and returns its unique identifier. */
BatchId finish() throws IOException;
}