InputStreams and OutputStreams

Download java eBook

Syntax

  • int read(byte[] b) throws IOException

Remarks

Note that most of the time you do NOT use InputStreams directly but use BufferedStreams, or similar. This is because InputStream reads from the source every time the read method is called. This can cause significant CPU usage in context switches into and out of the kernel.

Related Examples

Stats

223 Contributors: 11
Friday, June 23, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook