Click or drag to resize

BinaryWriter Class

SimplSharp.CrestronIO BinaryWriter instance to allow writing of data encoded as binary in a file.
Inheritance Hierarchy
SystemObject
  Crestron.SimplSharp.CrestronIOBinaryWriter

Namespace: Crestron.SimplSharp.CrestronIO
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public class BinaryWriter : IDisposable

The BinaryWriter type exposes the following members.

Constructors
 NameDescription
Public methodBinaryWriter(Stream) Initializes a new instance of the CrestronIO.BinaryWriter class based on the supplied stream and using UTF-8 as the encoding for strings.
Public methodBinaryWriter(String) Initializes a new instance of the Crestron BinaryWriter class based on the supplied file name. Defaults to UTF-8.
Public methodBinaryWriter(Stream, Encoding) Initializes a new instance of the CrestronIO.BinaryWriter class based on the supplied stream and a specific character encoding.
Public methodBinaryWriter(String, Encoding) Function to initializes a new instance of the Crestron BinaryWriter class based on the supplied stream and a specific character encoding.
Top
Properties
 NameDescription
Public propertyBaseStream Gets the base output stream.
Top
Methods
 NameDescription
Public methodClose Closes the current BinaryWriter and the underlying file.
Public methodDispose Disposes the current BinaryWriter and the underlying file and then suppresses further disposing.
Protected methodDispose(Boolean) Checks to see if Dispose has already been called.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Destructor for BinaryWriter.
(Overrides ObjectFinalize)
Public methodFlush Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodSeek Sets the position within the current file.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodWrite(Boolean) Writes a one-byte Boolean value to the current stream, with 0 representing false and 1 representing true and advances the current file pointer one byte.
Public methodWrite(Byte) Writes an unsigned byte to the current stream and advances the position by one byte.
Public methodWrite(Byte) Writes a byte array to the file.
Public methodWrite(Char) Writes a Unicode character to the current file and advances the current file pointer in accordance with the Encoding used and the specific characters being written to the file.
Public methodWrite(Char) Writes a Unicode character array to the current file and advances the current file pointer in accordance with the Encoding used and the specific characters being written to the file.
Public methodWrite(Decimal) Writes a decimal value and advances the current file pointer sixteen bytes.
Public methodWrite(Double) Writes a eight-byte floating-point value to the current file and advances the current file pointer by eight bytes.
Public methodWrite(Int16) Writes a two-byte signed integer to the file and advances the current file pointer by two bytes.
Public methodWrite(Int32) Writes a four-byte signed integer to the file and advances the current file pointer by four bytes.
Public methodWrite(Int64) Writes an eight-byte signed integer to the file and advances the current file pointer by eight bytes.
Public methodWrite(SByte) Writes a signed byte to the file and advances the current file pointer by one byte.
Public methodWrite(Single) Writes a four-byte floating-point value and advances the current file pointer by four bytes.
Public methodWrite(String) Writes a length-prefixed string to the file in the current encoding of the BinaryWriter, and advances the current position of the stream in accordance with the encoding used and the specific characters being written to the stream.
Public methodWrite(UInt16) Writes a two-byte unsigned integer to the current file and advances the current file pointer two bytes.
Public methodWrite(UInt32) Writes a four-byte unsigned integer to the current file and advances the current file pointer four bytes.
Public methodWrite(UInt64) Writes a eight-byte unsigned integer to the current file and advances the current file pointer eight bytes.
Public methodWrite(Byte, Int32, Int32) Writes a region of a byte array to the current file.
Public methodWrite(Char, Int32, Int32) Writes a section of a character array to the current file and advances the current file pointer in accordance with the encoding used and perhaps the specific characters being written to the file.
Top
Fields
 NameDescription
Public fieldStatic memberNull Specifies a CrestronIO.BinaryWriter with no backing store.
Top

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also