Here you can find the source of toStream(T[] array, boolean parallel)
public static <T> Stream<T> toStream(T[] array, boolean parallel)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.stream.Stream; import java.util.stream.StreamSupport; public class Main { public static <T> Stream<T> toStream(T[] array, boolean parallel) { return StreamSupport.stream(Arrays.spliterator(array), parallel); }//from w w w . j av a 2 s.c o m }