Here you can find the source of stream(Enumeration
public static <T> Stream<T> stream(Enumeration<T> enumeration)
//package com.java2s; //License from project: Apache License import java.util.Enumeration; import java.util.Iterator; import java.util.stream.Stream; import java.util.stream.StreamSupport; public class Main { public static <T> Stream<T> stream(Enumeration<T> enumeration) { return stream(enumeration); }/* w w w .j av a2 s .c om*/ public static <T> Stream<T> stream(Iterator<T> iterator) { Iterable<T> iterable = () -> iterator; return StreamSupport.stream(iterable.spliterator(), false); } }