@Override
  public SeekableByteChannel position(final long newPosition) throws IOException {
    ensureOpen();
    if (newPosition < 0L || newPosition > Integer.MAX_VALUE) {
      throw new IOException("Position has to be in range 0.. " + Integer.MAX_VALUE);
    }
    position = (int) newPosition;
    return this;
  }
Returns this channel's position.

<p>
This method violates the contract of {@link SeekableByteChannel#position()} as it will not throw any exception when
invoked on a closed channel. Instead it will return the position the channel had when close has been called.
</p>
planetiler-core/src/main/java/com/onthegomap/planetiler/util/SeekableInMemoryByteChannel.java