guava/src/com/google/common/primitives/ImmutableIntArray.java
public static ImmutableIntArray copyOf(IntStream stream) {
    // Note this uses very different growth behavior from copyOf(Iterable) and the builder.
    int[] array = stream.toArray();
    return (array.length == 0) ? EMPTY : new ImmutableIntArray(array);
  }
public static ImmutableIntArray copyOf(IntStream stream) {
    // Note this uses very different growth behavior from copyOf(Iterable) and the builder.
    int[] array = stream.toArray();
    return (array.length == 0) ? EMPTY : new ImmutableIntArray(array);
  }
public static ImmutableIntArray copyOf ( IntStream stream ) { // Note this uses very different growth behavior from copyOf(Iterable) and the builder. int [ ] array = stream . toArray ( ) ; return ( array . length == 0 ) ? EMPTY : new ImmutableIntArray ( array ) ; }
Returns an immutable array containing all the values from {@code stream}, in order.
Returns an immutable array containing all the values from {