answersLogoWhite

0


Best Answer

First of all, these two classes are on different levels of abstraction. An InputStream is used for reading any stream of bytes, while a FileReader is used to read characters from a file. If you want to ask between a FileInputStream and a FileReader, then we need to look at what type of data you are reading. If you're reading plain-text file, for example, you want to use a FileReader because it was designed to read in characters. For other types of data, the FileInputStream would be better, as it is used to read in generic streams of bytes from a file.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: To read data which is superior 1. input stream 2. file reader?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the input statement for a program?

Input statements extract data from an input stream. For example: int x; std::cin >> x; Output statements insert data to an output stream. For example: std::cout << x; You cannot insert data into an input stream and cannot extract data from an output stream. However, streams that are both input and output streams (such as read-write files) can insert and extract data as required, depending on whether you are reading or writing to the stream.


What is meant by input stream?

An input stream is a character sequence device or buffer from which input can be gathered. The standard input stream is usually a keyboard, data file or the output stream from another program. The user of the program can normally decide where standard input may be redirected from when launching the program, typically defaulting to the keyboard.


What are input output streams in c plus plus?

The term stream is a generic abstraction that says nothing about the implementation. However, if we use the analogy that gave it its name, a stream of water, we can better understand how a stream works. A water stream allows water to flow from one point to another in one direction only (downstream, with the flow of the current). If we were to throw a stick into the water, it would be carried downstream by the water where it could then be extracted. Sticks can be inserted or extracted automatically by devices, thus allowing information to pass between those devices.A file stream is a stream that is associated with a device representing a file. If the file is upstream then we can use the stream to extract information from the file. When we extract information from a stream, that stream is known as an input stream; it provides us with information. Conversely, if the file were downstream then we can use the stream to insert information into the file. When we insert information into a stream, that stream is known as an output stream; it carries information away from us.An input/output stream is one where we can both insert and extract information. An input/output file stream is a typical example: we can extract data from the file associated with the stream, process the data (modify it in some way), and then insert the modified data back into the same file. To implement an input/output stream, we simply use two streams associated with the same device: one specifically for input operations, the other specifically for output operations. This implementation detail is hidden from the user, so the stream appears to be a bi-directional stream as far as the user is concerned.


What is the Streaming data in the context of C plus plus refers to what?

Streams provide a unified, generic, input/output mechanism in C++. They allow a consistent method of inserting or extracting data from any physical storage medium that supports a stream implementation, such as a filestream or a stringstream, without the need to know the details of that medium. All streams operate in exactly the same way. To extract data from an input stream, use the extraction operator (>>). To insert data into a stream, use the insertion operator (<<). Some streams are omni-directional (input-only or output-only), while others are bi-directional (both input and output).


Information system input devices?

Input devices transfer data to an information system and the system processes the data. There are manual input devices and direct data entry devices that are used. Manual devices include keyboards and scanners. Direct data entry devices include smart cards and optical mark recognition.

Related questions

What is the input statement for a program?

Input statements extract data from an input stream. For example: int x; std::cin >> x; Output statements insert data to an output stream. For example: std::cout << x; You cannot insert data into an input stream and cannot extract data from an output stream. However, streams that are both input and output streams (such as read-write files) can insert and extract data as required, depending on whether you are reading or writing to the stream.


What is meant by input stream?

An input stream is a character sequence device or buffer from which input can be gathered. The standard input stream is usually a keyboard, data file or the output stream from another program. The user of the program can normally decide where standard input may be redirected from when launching the program, typically defaulting to the keyboard.


What reader can automatically input data from black and white stripes on the side of food?

A bar-code reader.


Is Card reader Writer input or output?

I expect you mean "Is Card reader/writer input or output?". If this is so, it is both an input and output device. Whenever you are trying to categorize a device as Input or Output, think of how it looks from the computer.If the computer is transmitting data to it, it is an Output device.If the computer is receiving data from it, it is an Input device.


Is bar code reader input output or storage devices?

A bar code reader is an input Device. Although they sometimes output a visible light, the purpose is to gather data from a printed code and input that data into your system (computer, Point of Sale, etc.)


What reader can automatically input data from black and white stripes on the side of food packages?

A bar-code reader.


Is a barcode reader an input or an output?

A bar code reader is an input Device. Although they sometimes output a visible light, the purpose is to gather data from a printed code and input that data into your system (computer, Point of Sale, etc.)


Is 'reading data on bank cheques' manual input device or direct data entry device?

It's 'manual' input. Because someone has to physically 'feed' the cheques though the reader.


What are input output streams in c plus plus?

The term stream is a generic abstraction that says nothing about the implementation. However, if we use the analogy that gave it its name, a stream of water, we can better understand how a stream works. A water stream allows water to flow from one point to another in one direction only (downstream, with the flow of the current). If we were to throw a stick into the water, it would be carried downstream by the water where it could then be extracted. Sticks can be inserted or extracted automatically by devices, thus allowing information to pass between those devices.A file stream is a stream that is associated with a device representing a file. If the file is upstream then we can use the stream to extract information from the file. When we extract information from a stream, that stream is known as an input stream; it provides us with information. Conversely, if the file were downstream then we can use the stream to insert information into the file. When we insert information into a stream, that stream is known as an output stream; it carries information away from us.An input/output stream is one where we can both insert and extract information. An input/output file stream is a typical example: we can extract data from the file associated with the stream, process the data (modify it in some way), and then insert the modified data back into the same file. To implement an input/output stream, we simply use two streams associated with the same device: one specifically for input operations, the other specifically for output operations. This implementation detail is hidden from the user, so the stream appears to be a bi-directional stream as far as the user is concerned.


Is a CD reader an input or output device?

A CD or DVD drive is a media device. Data is usually read from it, but data can also be sent to it if it has writing capabilities.


What is input in TNSDL language?

In TNSDL (Temporal Numerical Stream Description Language), the "input" statement is used to specify the input streams of data that the program will operate on. These input streams can be temporal or non-temporal data sources such as sensors, files, or user input. The input statement helps define the data sources that will be processed by the TNSDL program.


This reader can automatically input data from black and white stripes on the side of food packages?

Called a barcode scanner.