Class EndianBinaryReader
- Namespace
- FellowOakDicom.IO
- Assembly
- fo-dicom.core.dll
Endian aware binary reader.
public class EndianBinaryReader : BinaryReader, IDisposable
- Inheritance
-
EndianBinaryReader
- Implements
- Inherited Members
- Extension Methods
Constructors
EndianBinaryReader(Stream, Endian, bool)
Initializes an instance of the EndianBinaryReader class.
public EndianBinaryReader(Stream input, Endian endian, bool leaveOpen)
Parameters
input
StreamStream from which to read.
endian
EndianEndianness of the
input
.leaveOpen
booltrue to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false.
EndianBinaryReader(Stream, bool)
Initializes an instance of the EndianBinaryReader class.
public EndianBinaryReader(Stream input, bool leaveOpen)
Parameters
input
StreamStream from which to read.
leaveOpen
booltrue to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false.
EndianBinaryReader(Stream, Encoding, Endian, bool)
Initializes an instance of the EndianBinaryReader class.
public EndianBinaryReader(Stream input, Encoding encoding, Endian endian, bool leaveOpen)
Parameters
input
StreamStream from which to read.
encoding
EncodingEncoding of the
input
.endian
EndianEndianness of the
input
.leaveOpen
booltrue to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false.
EndianBinaryReader(Stream, Encoding, bool)
Initializes an instance of the EndianBinaryReader class.
public EndianBinaryReader(Stream input, Encoding encoding, bool leaveOpen)
Parameters
input
StreamStream from which to read.
encoding
EncodingEncoding of the
input
.leaveOpen
booltrue to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false.
Properties
Endian
Gets or sets the endianness of the binary reader.
public Endian Endian { get; protected set; }
Property Value
UseInternalBuffer
public bool UseInternalBuffer { get; set; }
Property Value
Methods
Create(Stream, Endian, bool)
Convenience method for creating a binary reader with requested endian
.
public static BinaryReader Create(Stream input, Endian endian, bool leaveOpen)
Parameters
input
StreamStream from which to read.
endian
EndianEndianness of the
input
.leaveOpen
booltrue to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false.
Returns
- BinaryReader
Binary reader with requested
endian
.
Create(Stream, Encoding, Endian, bool)
Convenience method for creating a binary reader with requested endian
.
public static BinaryReader Create(Stream input, Encoding encoding, Endian endian, bool leaveOpen)
Parameters
input
StreamStream from which to read.
encoding
EncodingEncoding of the
input
.endian
EndianEndianness of the
input
.leaveOpen
booltrue to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false.
Returns
- BinaryReader
Binary reader with requested
endian
.
ReadDouble()
public override double ReadDouble()
Returns
ReadInt16()
public override short ReadInt16()
Returns
ReadInt32()
public override int ReadInt32()
Returns
ReadInt64()
public override long ReadInt64()
Returns
ReadSingle()
public override float ReadSingle()
Returns
ReadUInt16()
public override ushort ReadUInt16()
Returns
ReadUInt32()
public override uint ReadUInt32()
Returns
ReadUInt64()
public override ulong ReadUInt64()