File Handling, Streams, and Serialization Flashcards

1
Q

What is file handling?

A

File handling refers to performming operations on files be it creating, opening, reading, writing, and closing files.

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

What packages are used for handling files in Java?

A

java.nio.file,
java.io.File

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

What class is commonly used for file handling in java?

A

The File class

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

What is a stream?

A

A stream is a sequence of data that eases reading from and writing to varios data sources like files, memory buffers or network connections

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

What are two type of stream you know?

A

Byte and Character streams

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

What is a Byte Stream?

A

It is a stream to handle input and output of 8bit bytes, suitabale fror raw binary data like images, audio files or other multimedia content. using classes like InputStream, and OutputStream

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

What is a character Stream?

A

These streams handle 16bit Unicode characters, making them best fro reading and writing text data as they automaticaly character encoding and decoding. Using classes like FileReader, or File Writer

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

What is Serialization?

A

It is the process of converting an object into a byte stream, allowing it to be easily saved to a file, sent over a network, or stored in a database.

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