Byte Streams and Byte Stream classes in Java

Byte Streams are used to handle the input and output of bytes. InputStream  and OutputStream  are the abstract stream classes. Here are the Byte Stream classes in Java:

  • InputStream: Used for stream input
  • OutputStream: Used for stream output
  • FilterInputStream: Used for Implementing InputStream
  • FilterOutputStream: Used for Implementing OutputStream
  • FileInputStream: Input stream which is used to read from a file
  • FileOutputStream: Output stream which is used to write to a file
  • DataInputStream: Input stream used to read Java standard data types
  • DataOutputStream: Output stream used to write Java standard data types
  • ByteArrayInputStream: Input stream used to read from a byte array
  • ByteArrayOutputStream: Output stream used to write to a byte array
  • BufferedInputStream: Buffered input stream
  • BufferedOutputStream: Buffered output stream
  • PipedInputStream: Input pipe stream
  • PipedOutputStream: Output pipe stream
  • PrintStream: Output stream that contains print( ), println( )
  • PushbackInputStream: Input stream which has one byte unget
  • RandomAccessFile: Used for random access file inout and output
  • SequenceInputStream: Input stream which is a combination of two or more input streams. It is read sequentially.

Leave a Reply