<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Stream on Kevin wang's blog</title><link>https://kevinwang930.github.io/tags/stream/</link><description>Recent content in Stream on Kevin wang's blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sat, 27 Jun 2026 18:02:29 +0800</lastBuildDate><atom:link href="https://kevinwang930.github.io/tags/stream/index.xml" rel="self" type="application/rss+xml"/><item><title>Java Stream internals</title><link>https://kevinwang930.github.io/post/java/stream/</link><pubDate>Sat, 27 Jun 2026 18:02:29 +0800</pubDate><guid>https://kevinwang930.github.io/post/java/stream/</guid><description>&lt;p&gt;&lt;code&gt;java.util.stream.Stream&lt;/code&gt; is the public face of Java 8&amp;rsquo;s functional-style aggregate operations. Under the hood it is not a data structure — it is a &lt;strong&gt;lazy pipeline&lt;/strong&gt; of linked stages backed by a &lt;code&gt;Spliterator&lt;/code&gt; source. Intermediate operations such as &lt;code&gt;filter&lt;/code&gt; and &lt;code&gt;map&lt;/code&gt; only extend the pipeline; computation begins when a terminal operation such as &lt;code&gt;collect&lt;/code&gt; or &lt;code&gt;forEach&lt;/code&gt; triggers evaluation. This document traces the OpenJDK implementation centered on &lt;code&gt;Stream&lt;/code&gt;, its pipeline machinery, and how elements flow from source to result.&lt;/p&gt;</description></item></channel></rss>