Java Streams: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
* [[java#Subjects|java]]
* [[java#Subjects|java]]


=Piped Streams=
Closing a PipedInputStream does not release a thread blocked on it in reading.
=System.out/System.err/System.in=


=Piped Streams=
{{External|https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#out}}
 
To replace the default System.out:


Can be used in testing blocking I/O.
<syntaxhighlight lang='java'>
System.setOut(...);
</syntaxhighlight>

Latest revision as of 14:37, 28 October 2017

Internal

Piped Streams

Closing a PipedInputStream does not release a thread blocked on it in reading.


System.out/System.err/System.in

https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#out

To replace the default System.out:

System.setOut(...);