public void flush() throws IOException {
        for (ByteBuffer b : buffers) {
            endpoint.send(b);
        }
        buffers.clear();
        if (current.position() > 0) {
            current.flip();
            appended += current.limit();
            endpoint.send(current);
            current = ByteBuffer.allocate(BUFFERSIZE);
        }
    }
Data store for AbstractByteWriter. Tested in unit tests for ByteWriter.

@author Steinar Knutsen
vespajlib/src/main/java/com/yahoo/io/BufferChain.java