Here you can find the source of stream(Iterable
public static <T> Stream<T> stream(Iterable<T> iterable)
//package com.java2s; //License from project: Apache License import java.util.Spliterator; import java.util.stream.Stream; import java.util.stream.StreamSupport; public class Main { public static <T> Stream<T> stream(Iterable<T> iterable) { Spliterator<T> spliterator = iterable.spliterator(); return StreamSupport.stream(spliterator, false); }/*from w w w. j a v a 2 s. c o m*/ }