Table of Contents

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 Stream

Stream from which to read.

endian Endian

Endianness of the input.

leaveOpen bool

true 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 Stream

Stream from which to read.

leaveOpen bool

true 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 Stream

Stream from which to read.

encoding Encoding

Encoding of the input.

endian Endian

Endianness of the input.

leaveOpen bool

true 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 Stream

Stream from which to read.

encoding Encoding

Encoding of the input.

leaveOpen bool

true 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

Endian

UseInternalBuffer

public bool UseInternalBuffer { get; set; }

Property Value

bool

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 Stream

Stream from which to read.

endian Endian

Endianness of the input.

leaveOpen bool

true 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 Stream

Stream from which to read.

encoding Encoding

Encoding of the input.

endian Endian

Endianness of the input.

leaveOpen bool

true 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

double

ReadInt16()

public override short ReadInt16()

Returns

short

ReadInt32()

public override int ReadInt32()

Returns

int

ReadInt64()

public override long ReadInt64()

Returns

long

ReadSingle()

public override float ReadSingle()

Returns

float

ReadUInt16()

public override ushort ReadUInt16()

Returns

ushort

ReadUInt32()

public override uint ReadUInt32()

Returns

uint

ReadUInt64()

public override ulong ReadUInt64()

Returns

ulong