private void resize(final int newLength) {
    int len = data.length;
    if (len <= 0) {
      len = 1;
    }
    if (newLength < NAIVE_RESIZE_LIMIT) {
      while (len < newLength) {
        len <<= 1;
      }
    } else { // avoid overflow
      len = newLength;
    }
    data = Arrays.copyOf(data, len);
  }
Obtains the array backing this channel.

<p>
NOTE: The returned buffer is not aligned with containing data, use {@link #size()} to obtain the size of data
stored in the buffer.
</p>

@return internal byte array.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/SeekableInMemoryByteChannel.java