Github user dweiss commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/432#discussion_r208520234 --- Diff: lucene/core/src/java/org/apache/lucene/store/ByteBuffersDataOutput.java --- @@ -0,0 +1,488 @@ +package org.apache.lucene.store; + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.ByteBuffer; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.function.Consumer; +import java.util.function.IntConsumer; +import java.util.function.IntFunction; + +import org.apache.lucene.util.Accountable; +import org.apache.lucene.util.BitUtil; +import org.apache.lucene.util.BytesRef; +import org.apache.lucene.util.RamUsageEstimator; +import org.apache.lucene.util.UnicodeUtil; + +public final class ByteBuffersDataOutput extends DataOutput implements Accountable { + private final static ByteBuffer EMPTY = ByteBuffer.allocate(0); + private final static List<ByteBuffer> EMPTY_LIST = Arrays.asList(EMPTY); + private final static byte [] EMPTY_BYTE_ARRAY = {}; + + public final static IntFunction<ByteBuffer> ALLOCATE_BB_ON_HEAP = (size) -> { --- End diff -- I'll try to pay attention to that, thanks for looking!
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org