private boolean isAllInOneWriteBuffer(int length) {
    return writePos.offset + length <= wbSize;
  }
Changes the byte segment reference from being a reference to global buffer to
the one with a self-contained byte array. The byte array will either be one of
the internal ones, or a copy of data if the original reference pointed to a data
spanning multiple internal buffers.
serde/src/java/org/apache/hadoop/hive/serde2/WriteBuffers.java