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
StreamStream to which output should be written.
endian
EndianEndianness of the output.
leaveOpen
booltrue 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
StreamStream to which output should be written.
leaveOpen
booltrue 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
StreamStream to which output should be written.
encoding
EncodingOutput encoding.
endian
EndianEndianness of the output.
leaveOpen
booltrue 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
StreamStream to which output should be written.
encoding
EncodingOutput encoding.
leaveOpen
booltrue 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
output
StreamStream to which output should be written.
endian
EndianEndianness of the output.
leaveOpen
booltrue 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
StreamStream to which output should be written.
encoding
EncodingOutput encoding.
endian
EndianEndianness of the output.
leaveOpen
booltrue 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