private void doFlush() { if (buffer != null && count > 0) { // write page header bufferSlice.setInt(0, count); buffer.limit(position); // flush page Page page = Page.wrap(buffer).setStringReferences(getSortedStringReferences()); buffer = null; bufferSlice = null; output.add(page); } }
public void finish() { doFlush(); output.finish(); }