Exam 19: Streams and Binary Inputoutput

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following classes are related through inheritance? I InputStream II InputStreamReader III ObjectInputStream

(Multiple Choice)
4.8/5
(31)

Which methods are not in the Serializable interface? I readObject II writeObject III serializeObject

(Multiple Choice)
4.7/5
(38)

Readers and writers access sequences of ____.

(Multiple Choice)
4.9/5
(45)

Caesar cipher uses a shift of each character by a key with a value between 1 and 255. An a with a shift equal to 3 becomes a d. For the decrypt method below, select the correct body. Assume the key shift property is accessible to the method. Public int decrypt(int b) { ________ }

(Multiple Choice)
4.9/5
(36)

If you write a simple Student class, what must you do in order to write Student objects to an ObjectOutputStream?

(Multiple Choice)
4.9/5
(45)

You use _________ and FileOutputStream objects to write data to a disk file in text or binary form respectively.

(Multiple Choice)
4.8/5
(28)

What is the lowest value for a signed (negative and positive) byte?

(Multiple Choice)
4.8/5
(44)

Assume we have a RandomAccessFile object, file, which stores a set of records of class MyData, each needing MyData.RECORD_SIZE bytes for storage. If the file pointer is currently on the 24th record, which expression gets to the offset of the beginning of the 25th record?

(Multiple Choice)
4.9/5
(29)

The FileInputStream read method reads binary data. What type is actually returned from a call to read?

(Multiple Choice)
4.9/5
(36)

If you want to process text data from a file, which keyword do you look for in classes that specialize in doing that?

(Multiple Choice)
4.8/5
(39)

In text format, data items are represented in human-readable form, as a sequence of ____________________.

(Multiple Choice)
4.8/5
(41)

What is returned by the read method when a FileInputStream has reached the end of the file?

(Multiple Choice)
4.8/5
(36)

In ____________ file access, the file is processed starting from the beginning.

(Multiple Choice)
4.8/5
(39)

Which of the following classes are used with data in binary form? I FileInputStream II FileReader III RandomAccessFile

(Multiple Choice)
4.9/5
(43)

The values of the byte type range from ____ to ____.

(Multiple Choice)
4.7/5
(41)

A byte is composed of ____ bits and can denote ____ values.

(Multiple Choice)
5.0/5
(36)

When storing numbers in a file with fixed record sizes, it is easier to store them in __________ format.

(Multiple Choice)
4.7/5
(42)

In Java, the simplest mechanism for reading text is to use the ____ class.

(Multiple Choice)
5.0/5
(32)

How many bytes does the read method in the FileInputStream class actually get from the file?

(Multiple Choice)
4.8/5
(36)

If we want to write objects to a file, what type of object should be passed to the ObjectOutputStream constructor?

(Multiple Choice)
4.9/5
(38)
Showing 21 - 40 of 82
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)