@Override
        public LinkedBuffer drain(final WriteSession session,
                final LinkedBuffer lb) throws IOException
        {
            // flush and reset
            lb.offset = session.flush(lb.buffer, lb.start, lb.offset - lb.start);
            return lb;
        }
The flexible output for outputs that use {@link WriteSession}.

@author David Yu
@created Sep 20, 2010
protostuff-api/src/main/java/io/protostuff/WriteSink.java