A Stream is a builder for some code which is optimised at run time. It's execution isn't as dynamic as it appears.

网友答案:

Streams are not supposed to be reused, or if you want something seemed to it, you can use suppliers as mentioned here : Copy a stream to avoid "stream has already been operated upon or closed" (java 8)