Skip to content

Streams including default System streams not finished

EWriter edited this page Dec 24, 2021 · 2 revisions

In Java, 3 streams are created for us automatically. All these streams are attached with the console.

  1. System.out: standard output stream

  2. System.in: standard input stream

  3. System.err: standard error stream

InputStream

public abstract class InputStream extends Object implements Closeable

This abstract class is the superclass of all classes representing an input stream of bytes.

Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input.

OutputStream class is an abstract class. It is the superclass of all classes representing an output stream of bytes. An output stream accepts output bytes and sends them to some sink.

OutputStream - used to write data to a destination; it may be a file, an array, peripheral device or socket.

Types of Streams

File IO Buffered IO Sequence ByteArray IO Data IO Filter IO Object Stream Object Stream Field

Clone this wiki locally