Topic 1 Flashcards

1
Q

What is a stream in Java?

A

A sequence of data elements that can be read from or written to a specific source

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a stream pipeline?

A

The operations that run on a stream to produce a result

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does java.io.Package do?

A

Provides classes for handling byte and character streams, as well as primitives and objects through serialization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the types of streams?

A

Input and output streams

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an input stream?

A

They are used to read data from a source into a program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an output stream?

A

They are used to write data to a local folder on your PC or a location on a network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are Byte streams

A

These are used for reading and writing binary data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Inheritance?

A

Byte Streams inherit from InputStream and OutputStream

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

FileInputStream

A

Reads bytes from a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

FileOutputStream

A

Writes bytes to a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

DataInputStream

A

Allows for reading primitive data types from an underlying input stream

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

DataOutputStream

A

Allows for writing primitive data types to an underlying output stream

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the Read method do?

A

Reads one byte at a time from a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a file path?

A

The string provided in the constructor specifies the location of the file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is String formatting

A

It allows you to create strings that include dynamic content such as variables or expressions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are filtered streams?

A

They modify data as it is read or written through an existing stream

17
Q

Buffers

A

Are places in memory where data can be stored before it is needed by a program

18
Q

Character streams

A

Are designed for handling data that is based on characters rather than bytes