JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Using the BinaryWriter Class

As discussed in the In Depth section of this chapter, after you have a FileStream object, you can use the BinaryWriter class to write binary data to a file. Here is the hierarchy of the BinaryWriter class:

Object
   BinaryWriter

You can find the more notable public properties of the BinaryWriter class in Table 13.16 and the more notable methods of this class in Table 13.17.

Table 13.16: Noteworthy public properties of BinaryWriter objects.

Property

Means

BaseStream

Gets the underlying stream, giving you access to that stream's properties and methods.

Table 13.17: Noteworthy public methods of BinaryWriter objects.

Method

Means

Close

Closes the binary writer as well as the underlying stream.

Flush

Flushes the buffer of the binary writer and writes out any buffered data.

Seek

Sets the read/write position in the stream.

Write

Writes data to the stream.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor