Calculate the new capacity of a {@link ByteBuf} that is used when a {@link ByteBuf} needs to expand by the {@code minNewCapacity} with {@code maxCapacity} as upper-bound.
See Implementation
Calculate the new capacity of a {@link ByteBuf} that is used when a {@link ByteBuf} needs to expand by the {@code minNewCapacity} with {@code maxCapacity} as upper-bound.