@Test public void simpleUnknownLengthPayload() { writeUnknownLength(framer, new byte[]{3, 14}); framer.flush(); verify(sink).deliverFrame(toWriteBuffer(new byte[] {0, 0, 0, 0, 2}), false, false); verify(sink).deliverFrame(toWriteBuffer(new byte[] {3, 14}), false, true); assertEquals(2, allocator.allocCount); verifyNoMoreInteractions(sink); }
public void flush() { if (buffer != null && buffer.readableBytes() > 0) { commitToSink(false, true); } }
MessageFramer { public void flush() { if (buffer != null && buffer.readableBytes() > 0) { commitToSink(false, true); } } }
MessageFramer { public void flush() { if (buffer != null && buffer.readableBytes() > 0) { commitToSink(false, true); } } MessageFramer(Sink sink, WritableBufferAllocator bufferAllocator); }
MessageFramer { public void flush() { if (buffer != null && buffer.readableBytes() > 0) { commitToSink(false, true); } } MessageFramer(Sink sink, WritableBufferAllocator bufferAllocator); void writePayload(InputStream message); void flush(); boolean isClosed(); void close(); void dispose(); }
MessageFramer { public void flush() { if (buffer != null && buffer.readableBytes() > 0) { commitToSink(false, true); } } MessageFramer(Sink sink, WritableBufferAllocator bufferAllocator); void writePayload(InputStream message); void flush(); boolean isClosed(); void close(); void dispose();  }