0% found this document useful (0 votes)
85 views1 page

Java Streams FAQ Guide

The document discusses streams in Java, noting that a stream is a sequence of bytes traveling from a source to a destination, and the two basic streams in Java are input and output streams where you can only read from an input stream and write to an output stream. It also discusses markable streams which allow placing bookmarks and resetting the stream, stream classes like FileInputStream and FileOutputStream, and Reader and Writer classes which support reading and writing Unicode character streams using 16 bits per character.

Uploaded by

sreilal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views1 page

Java Streams FAQ Guide

The document discusses streams in Java, noting that a stream is a sequence of bytes traveling from a source to a destination, and the two basic streams in Java are input and output streams where you can only read from an input stream and write to an output stream. It also discusses markable streams which allow placing bookmarks and resetting the stream, stream classes like FileInputStream and FileOutputStream, and Reader and Writer classes which support reading and writing Unicode character streams using 16 bits per character.

Uploaded by

sreilal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Frequently Asked Questions Subject Name: OOPS with Java Unit 7: Streams in Java

Balasubramani R Assistant Professor Dept. of IT

Subject Code: BT0074

Q1: What is a Stream? A1: Java handles all input and output in the form of streams. A stream is a sequence of bytes traveling from a source to a destination over a communication path. If a program writes into a stream, it is the streams source. Similarly, if it is reading from a stream, it is the streams destination. Q2: What are the two basic streams in Java? A2: The two basic streams used are the input and the output streams. Each stream has a particular functionality. You can only read from an input stream and conversely, you can only write to an output stream. Q3: What are Markable Streams? A3: Markable streams provide the capability of placing bookmarks on the stream and resetting it. This stream can then be read from the marked position. If a stream is marked, it must have some memory associated with it to keep track of the data between the mark and the current position of the stream. Q4: What are the various Stream Classes in Java? A4: Stream Classes are classified as FileInputStream, FileOutputStream, BufferedInputStream, BufferedOutputStream, DataInputStream, and DataOutputStream classes. Q5: What are Reader and Writer classes? A5: The Reader and Writer classes are abstract classes that support the reading and writing of Unicode character streams. Unicode is used to represent data such that each character is represented by 16 bits.

You might also like