Added Consumer support to Writer, to avoid redundant copying.

This commit is contained in:
akwizgran
2011-09-28 18:47:24 +01:00
parent 9c2e3917bf
commit a8b96f11fd
12 changed files with 134 additions and 97 deletions

View File

@@ -6,7 +6,5 @@ public interface Consumer {
void write(byte b) throws IOException;
void write(byte[] b) throws IOException;
void write(byte[] b, int off, int len) throws IOException;
}

View File

@@ -6,6 +6,9 @@ import java.util.Map;
public interface Writer {
void addConsumer(Consumer c);
void removeConsumer(Consumer c);
void writeBoolean(boolean b) throws IOException;
void writeUint7(byte b) throws IOException;