Table of Contents

Class EndianBinaryWriter

Namespace
FellowOakDicom.IO
Assembly
fo-dicom.core.dll

Endian aware binary writer.

public class EndianBinaryWriter : BinaryWriter, IDisposable
Inheritance
EndianBinaryWriter
Implements
Inherited Members
Extension Methods

Constructors

EndianBinaryWriter(Stream, Endian, bool)

Initializes an instance of the EndianBinaryWriter class.

public EndianBinaryWriter(Stream output, Endian endian, bool leaveOpen)

Parameters

output Stream

Stream to which output should be written.

endian Endian

Endianness of the output.

leaveOpen bool

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

EndianBinaryWriter(Stream, bool)

Initializes an instance of the EndianBinaryWriter class.

public EndianBinaryWriter(Stream output, bool leaveOpen)

Parameters

output Stream

Stream to which output should be written.

leaveOpen bool

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

Remarks

Uses the endianness of the system.

EndianBinaryWriter(Stream, Encoding, Endian, bool)

Initializes an instance of the EndianBinaryWriter class.

public EndianBinaryWriter(Stream output, Encoding encoding, Endian endian, bool leaveOpen)

Parameters

output Stream

Stream to which output should be written.

encoding Encoding

Output encoding.

endian Endian

Endianness of the output.

leaveOpen bool

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

EndianBinaryWriter(Stream, Encoding, bool)

Initializes an instance of the EndianBinaryWriter class.

public EndianBinaryWriter(Stream output, Encoding encoding, bool leaveOpen)

Parameters

output Stream

Stream to which output should be written.

encoding Encoding

Output encoding.

leaveOpen bool

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

Remarks

Uses the endianness of the system.

Properties

Endian

Gets or sets the endianness of the binary writer.

public Endian Endian { get; protected set; }

Property Value

Endian

Methods

Create(Stream, Endian, bool)

Convenience method for creating a sufficient binary writer based on specified endian.

public static BinaryWriter Create(Stream output, Endian endian, bool leaveOpen)

Parameters

output Stream

Stream to which output should be written.

endian Endian

Endianness of the output.

leaveOpen bool

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

Returns

BinaryWriter

Binary writer with desired endian-

Create(Stream, Encoding, Endian, bool)

Convenience method for creating a sufficient binary writer based on specified endian.

public static BinaryWriter Create(Stream output, Encoding encoding, Endian endian, bool leaveOpen)

Parameters

output Stream

Stream to which output should be written.

encoding Encoding

Output encoding.

endian Endian

Endianness of the output.

leaveOpen bool

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

Returns

BinaryWriter

Binary writer with desired endian-

Write(double)

public override void Write(double value)

Parameters

value double

Write(short)

public override void Write(short value)

Parameters

value short

Write(int)

public override void Write(int value)

Parameters

value int

Write(long)

public override void Write(long value)

Parameters

value long

Write(float)

public override void Write(float value)

Parameters

value float

Write(ushort)

public override void Write(ushort value)

Parameters

value ushort

Write(uint)

public override void Write(uint value)

Parameters

value uint

Write(ulong)

public override void Write(ulong value)

Parameters

value ulong