System.IO.BinaryWriter: Method Members

The methods of System.IO.BinaryWriter are listed below. For a list of all members, see the BinaryWriter Members list.

See Also: Inherited members from System.Object

Public Methods

Close()

Closes the current System.IO.BinaryWriter and the underlying stream.

Dispose()

Releases all resources used by the current instance of the System.IO.BinaryWriter class.

Flush()

Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.

Seek(int, SeekOrigin) : long

Sets the position within the current stream.

Write(bool)

Writes a one-byte Boolean value to the current stream, with 0 representing false and 1 representing true.

Write(byte)

Writes an unsigned byte to the current stream and advances the stream position by one byte.

Write(byte[])

Writes a byte array to the underlying stream.

Write(char)

Writes a Unicode character to the current stream and advances the current position of the stream in accordance with the Encoding used and the specific characters being written to the stream.

Write(char[])

Writes a character array to the current stream and advances the current position of the stream in accordance with the Encoding used and the specific characters being written to the stream.

Write(decimal)

Writes a decimal value to the current stream and advances the stream position by sixteen bytes.

Write(double)

Writes an eight-byte floating-point value to the current stream and advances the stream position by eight bytes.

Write(short)

Writes a two-byte signed integer to the current stream and advances the stream position by two bytes.

Write(int)

Writes a four-byte signed integer to the current stream and advances the stream position by four bytes.

Write(long)

Writes an eight-byte signed integer to the current stream and advances the stream position by eight bytes.

Write(sbyte)

Writes a signed byte to the current stream and advances the stream position by one byte.

Write(float)

Writes a four-byte floating-point value to the current stream and advances the stream position by four bytes.

Write(string)

Writes a length-prefixed string to this stream in the current encoding of the System.IO.BinaryWriter, and advances the current position of the stream in accordance with the encoding used and the specific characters being written to the stream.

Write(ushort)

Writes a two-byte unsigned integer to the current stream and advances the stream position by two bytes.

Write(uint)

Writes a four-byte unsigned integer to the current stream and advances the stream position by four bytes.

Write(ulong)

Writes an eight-byte unsigned integer to the current stream and advances the stream position by eight bytes.

Write(byte[], int, int)

Writes a region of a byte array to the current stream.

Write(char[], int, int)

Writes a section of a character array to the current stream, and advances the current position of the stream in accordance with the Encoding used and perhaps the specific characters being written to the stream.

Protected Methods

Dispose(bool)

Releases the unmanaged resources used by the System.IO.BinaryWriter and optionally releases the managed resources.

Write7BitEncodedInt(int)

Writes a 32-bit integer in a compressed format.