Note that most of the time you do NOT use InputStream
s directly but use BufferedStream
s, 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.