[]
        
(Showing Draft Content)

GrapeCity.Documents.Common.GcBinaryWriter

Class GcBinaryWriter

Namespace
GrapeCity.Documents.Common
Assembly
GcDocs.Imaging.dll

The BinaryWriter with some additional functionality.

public class GcBinaryWriter : BinaryWriter, IDisposable
Inheritance
GcBinaryWriter
Implements
Inherited Members

Constructors

GcBinaryWriter(Stream, Encoding, bool)

Initializes a new instance of the GcBinaryWriter class.

public GcBinaryWriter(Stream baseStream, Encoding encoding, bool leaveOpen)

Parameters

baseStream Stream

The underlying Stream object.

encoding Encoding

The encoding used for strings.

leaveOpen bool

true to leave the stream open after the GcBinaryWriter object is disposed; otherwise, false.

Methods

Write7BitEncodedInt(int)

Writes 32 int in compressed form.

public void Write7BitEncodedInt(int value)

Parameters

value int

WriteEnum<T>(T)

Writes enum value.

public void WriteEnum<T>(T value) where T : struct

Parameters

value T

Type Parameters

T

WriteNullableEnum<T>(T?)

Writes nullable enum value.

public void WriteNullableEnum<T>(T? value) where T : struct

Parameters

value T?

Type Parameters

T

WriteNullableInt(int?)

Writes nullable int.

public void WriteNullableInt(int? value)

Parameters

value int?

WriteNullableString(string)

Writes a length-prefixed string to this stream 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. -1 is used to indicate null string.

public void WriteNullableString(string value)

Parameters

value string