Exam 20: Streams and Binary Inputoutput

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

In which of the following modes can a RandomAccessFiles be opened? I "r" II "rw" III "w"

(Multiple Choice)
4.9/5
(28)

Which code stores an array buttonArray of JButton objects in a file named buttonFile? We ignore exceptions in this problem.

(Multiple Choice)
4.9/5
(38)

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

(Multiple Choice)
4.9/5
(30)

Which file storage method stores data in bytes?

(Multiple Choice)
4.9/5
(46)

Which interface allows classes to be written to an ObjectOutputStream?

(Multiple Choice)
4.9/5
(39)

Which class is used for input of text data?

(Multiple Choice)
4.9/5
(42)

Given a RandomAccessFile that stores a set of records of class MyData, each needing MyData.RECORD_SIZE bytes for storage, which expression gets the offset to the beginning of the 25th record?

(Multiple Choice)
4.8/5
(42)

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
(38)

Which of these classes access sequences of characters? I readers II writers III streams

(Multiple Choice)
4.9/5
(33)

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.7/5
(39)

Which of the following statements enables you to write output to a text file?

(Multiple Choice)
4.8/5
(34)

__________ access allows file access at arbitrary locations, without first reading the bytes preceding the access location.

(Multiple Choice)
4.8/5
(26)

Which is not a method in the RandomAccessFile class?

(Multiple Choice)
4.9/5
(39)

The ______ method returns an integer, either -1 (at the end of the file) or a byte between 0 and 255.

(Multiple Choice)
4.8/5
(34)

Which line completes this code fragment so it creates a text file called "mychars.txt" and writes the characters 'A', 'B', and 'C' into the file? _____________________ Fw)write('A'); Fw)write('B'); Fw)write('C');

(Multiple Choice)
4.7/5
(37)

The readInt and writeInt methods of the RandomAccessFile class read and write integers as ____ quantities.

(Multiple Choice)
4.8/5
(32)

Which method in the RandomAccessFile class provides for random access?

(Multiple Choice)
4.8/5
(33)

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

(Multiple Choice)
4.9/5
(33)

In which package are most classes for file processing found?

(Multiple Choice)
4.8/5
(33)

Which method moves the file pointer in a RandomAccessFile?

(Multiple Choice)
4.8/5
(35)
Showing 61 - 80 of 82
close modal

Filters

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