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
outputStreamStream to which output should be written.
endianEndianEndianness of the output.
leaveOpenbooltrue 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
outputStreamStream to which output should be written.
leaveOpenbooltrue 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
outputStreamStream to which output should be written.
encodingEncodingOutput encoding.
endianEndianEndianness of the output.
leaveOpenbooltrue 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
outputStreamStream to which output should be written.
encodingEncodingOutput encoding.
leaveOpenbooltrue 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
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
outputStreamStream to which output should be written.
endianEndianEndianness of the output.
leaveOpenbooltrue 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
outputStreamStream to which output should be written.
encodingEncodingOutput encoding.
endianEndianEndianness of the output.
leaveOpenbooltrue 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
valuedouble
Write(short)
public override void Write(short value)
Parameters
valueshort
Write(int)
public override void Write(int value)
Parameters
valueint
Write(long)
public override void Write(long value)
Parameters
valuelong
Write(float)
public override void Write(float value)
Parameters
valuefloat
Write(ushort)
public override void Write(ushort value)
Parameters
valueushort
Write(uint)
public override void Write(uint value)
Parameters
valueuint
Write(ulong)
public override void Write(ulong value)
Parameters
valueulong