Class EndianBinaryReader
Endian aware binary reader.
Inheritance
Implements
Inherited Members
Namespace: FellowOakDicom.IO
Assembly: fo-dicom.core.dll
Syntax
public class EndianBinaryReader : BinaryReader, IDisposable
Constructors
EndianBinaryReader(Stream, Endian, Boolean)
Initializes an instance of the EndianBinaryReader class.
Declaration
public EndianBinaryReader(Stream input, Endian endian, bool leaveOpen)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | Stream from which to read. |
Endian | endian | Endianness of the |
System.Boolean | leaveOpen | true to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false. |
EndianBinaryReader(Stream, Boolean)
Initializes an instance of the EndianBinaryReader class.
Declaration
public EndianBinaryReader(Stream input, bool leaveOpen)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | Stream from which to read. |
System.Boolean | leaveOpen | true to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false. |
EndianBinaryReader(Stream, Encoding, Endian, Boolean)
Initializes an instance of the EndianBinaryReader class.
Declaration
public EndianBinaryReader(Stream input, Encoding encoding, Endian endian, bool leaveOpen)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | Stream from which to read. |
System.Text.Encoding | encoding | Encoding of the |
Endian | endian | Endianness of the |
System.Boolean | leaveOpen | true to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false. |
EndianBinaryReader(Stream, Encoding, Boolean)
Initializes an instance of the EndianBinaryReader class.
Declaration
public EndianBinaryReader(Stream input, Encoding encoding, bool leaveOpen)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | Stream from which to read. |
System.Text.Encoding | encoding | Encoding of the |
System.Boolean | leaveOpen | 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.
Declaration
public Endian Endian { get; protected set; }
Property Value
Type | Description |
---|---|
Endian |
UseInternalBuffer
Declaration
public bool UseInternalBuffer { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Create(Stream, Endian, Boolean)
Convenience method for creating a binary reader with requested endian
.
Declaration
public static BinaryReader Create(Stream input, Endian endian, bool leaveOpen)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | Stream from which to read. |
Endian | endian | Endianness of the |
System.Boolean | leaveOpen | true to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false. |
Returns
Type | Description |
---|---|
System.IO.BinaryReader | Binary reader with requested |
Create(Stream, Encoding, Endian, Boolean)
Convenience method for creating a binary reader with requested endian
.
Declaration
public static BinaryReader Create(Stream input, Encoding encoding, Endian endian, bool leaveOpen)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | Stream from which to read. |
System.Text.Encoding | encoding | Encoding of the |
Endian | endian | Endianness of the |
System.Boolean | leaveOpen | true to leave the stream open after the EndianBinaryReaderr object is disposed; otherwise, false. |
Returns
Type | Description |
---|---|
System.IO.BinaryReader | Binary reader with requested |
ReadDouble()
Declaration
public override double ReadDouble()
Returns
Type | Description |
---|---|
System.Double |
Overrides
ReadInt16()
Declaration
public override short ReadInt16()
Returns
Type | Description |
---|---|
System.Int16 |
Overrides
ReadInt32()
Declaration
public override int ReadInt32()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
ReadInt64()
Declaration
public override long ReadInt64()
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
ReadSingle()
Declaration
public override float ReadSingle()
Returns
Type | Description |
---|---|
System.Single |
Overrides
ReadUInt16()
Declaration
public override ushort ReadUInt16()
Returns
Type | Description |
---|---|
System.UInt16 |
Overrides
ReadUInt32()
Declaration
public override uint ReadUInt32()
Returns
Type | Description |
---|---|
System.UInt32 |
Overrides
ReadUInt64()
Declaration
public override ulong ReadUInt64()
Returns
Type | Description |
---|---|
System.UInt64 |