Fellow Oak DICOM
Search Results for

    Show / Hide Table of Contents

    Class EndianBinaryWriter

    Endian aware binary writer.

    Inheritance
    System.Object
    System.IO.BinaryWriter
    EndianBinaryWriter
    Implements
    System.IDisposable
    Inherited Members
    System.IO.BinaryWriter.Null
    System.IO.BinaryWriter.OutStream
    System.IO.BinaryWriter.Close()
    System.IO.BinaryWriter.Dispose()
    System.IO.BinaryWriter.Dispose(System.Boolean)
    System.IO.BinaryWriter.Flush()
    System.IO.BinaryWriter.Seek(System.Int32, System.IO.SeekOrigin)
    System.IO.BinaryWriter.Write(System.Boolean)
    System.IO.BinaryWriter.Write(System.Byte)
    System.IO.BinaryWriter.Write(System.Byte[])
    System.IO.BinaryWriter.Write(System.Byte[], System.Int32, System.Int32)
    System.IO.BinaryWriter.Write(System.Char)
    System.IO.BinaryWriter.Write(System.Char[])
    System.IO.BinaryWriter.Write(System.Char[], System.Int32, System.Int32)
    System.IO.BinaryWriter.Write(System.Decimal)
    System.IO.BinaryWriter.Write(System.SByte)
    System.IO.BinaryWriter.Write(System.String)
    System.IO.BinaryWriter.Write7BitEncodedInt(System.Int32)
    System.IO.BinaryWriter.BaseStream
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: FellowOakDicom.IO
    Assembly: fo-dicom.core.dll
    Syntax
    public class EndianBinaryWriter : BinaryWriter, IDisposable

    Constructors

    EndianBinaryWriter(Stream, Endian, Boolean)

    Initializes an instance of the EndianBinaryWriter class.

    Declaration
    public EndianBinaryWriter(Stream output, Endian endian, bool leaveOpen)
    Parameters
    Type Name Description
    System.IO.Stream output

    Stream to which output should be written.

    Endian endian

    Endianness of the output.

    System.Boolean leaveOpen

    true to leave the stream open after the System.IO.BinaryWriter object is disposed; otherwise, false.

    EndianBinaryWriter(Stream, Boolean)

    Initializes an instance of the EndianBinaryWriter class.

    Declaration
    public EndianBinaryWriter(Stream output, bool leaveOpen)
    Parameters
    Type Name Description
    System.IO.Stream output

    Stream to which output should be written.

    System.Boolean leaveOpen

    true to leave the stream open after the System.IO.BinaryWriter object is disposed; otherwise, false.

    Remarks

    Uses the endianness of the system.

    EndianBinaryWriter(Stream, Encoding, Endian, Boolean)

    Initializes an instance of the EndianBinaryWriter class.

    Declaration
    public EndianBinaryWriter(Stream output, Encoding encoding, Endian endian, bool leaveOpen)
    Parameters
    Type Name Description
    System.IO.Stream output

    Stream to which output should be written.

    System.Text.Encoding encoding

    Output encoding.

    Endian endian

    Endianness of the output.

    System.Boolean leaveOpen

    true to leave the stream open after the System.IO.BinaryWriter object is disposed; otherwise, false.

    EndianBinaryWriter(Stream, Encoding, Boolean)

    Initializes an instance of the EndianBinaryWriter class.

    Declaration
    public EndianBinaryWriter(Stream output, Encoding encoding, bool leaveOpen)
    Parameters
    Type Name Description
    System.IO.Stream output

    Stream to which output should be written.

    System.Text.Encoding encoding

    Output encoding.

    System.Boolean leaveOpen

    true to leave the stream open after the System.IO.BinaryWriter object is disposed; otherwise, false.

    Remarks

    Uses the endianness of the system.

    Properties

    Endian

    Gets or sets the endianness of the binary writer.

    Declaration
    public Endian Endian { get; protected set; }
    Property Value
    Type Description
    Endian

    Methods

    Create(Stream, Endian, Boolean)

    Convenience method for creating a sufficient binary writer based on specified endian.

    Declaration
    public static BinaryWriter Create(Stream output, Endian endian, bool leaveOpen)
    Parameters
    Type Name Description
    System.IO.Stream output

    Stream to which output should be written.

    Endian endian

    Endianness of the output.

    System.Boolean leaveOpen

    true to leave the stream open after the System.IO.BinaryWriter object is disposed; otherwise, false.

    Returns
    Type Description
    System.IO.BinaryWriter

    Binary writer with desired endian-

    Create(Stream, Encoding, Endian, Boolean)

    Convenience method for creating a sufficient binary writer based on specified endian.

    Declaration
    public static BinaryWriter Create(Stream output, Encoding encoding, Endian endian, bool leaveOpen)
    Parameters
    Type Name Description
    System.IO.Stream output

    Stream to which output should be written.

    System.Text.Encoding encoding

    Output encoding.

    Endian endian

    Endianness of the output.

    System.Boolean leaveOpen

    true to leave the stream open after the System.IO.BinaryWriter object is disposed; otherwise, false.

    Returns
    Type Description
    System.IO.BinaryWriter

    Binary writer with desired endian-

    Write(Double)

    Declaration
    public override void Write(double value)
    Parameters
    Type Name Description
    System.Double value
    Overrides
    System.IO.BinaryWriter.Write(System.Double)

    Write(Int16)

    Declaration
    public override void Write(short value)
    Parameters
    Type Name Description
    System.Int16 value
    Overrides
    System.IO.BinaryWriter.Write(System.Int16)

    Write(Int32)

    Declaration
    public override void Write(int value)
    Parameters
    Type Name Description
    System.Int32 value
    Overrides
    System.IO.BinaryWriter.Write(System.Int32)

    Write(Int64)

    Declaration
    public override void Write(long value)
    Parameters
    Type Name Description
    System.Int64 value
    Overrides
    System.IO.BinaryWriter.Write(System.Int64)

    Write(Single)

    Declaration
    public override void Write(float value)
    Parameters
    Type Name Description
    System.Single value
    Overrides
    System.IO.BinaryWriter.Write(System.Single)

    Write(UInt16)

    Declaration
    public override void Write(ushort value)
    Parameters
    Type Name Description
    System.UInt16 value
    Overrides
    System.IO.BinaryWriter.Write(System.UInt16)

    Write(UInt32)

    Declaration
    public override void Write(uint value)
    Parameters
    Type Name Description
    System.UInt32 value
    Overrides
    System.IO.BinaryWriter.Write(System.UInt32)

    Write(UInt64)

    Declaration
    public override void Write(ulong value)
    Parameters
    Type Name Description
    System.UInt64 value
    Overrides
    System.IO.BinaryWriter.Write(System.UInt64)

    Implements

    System.IDisposable

    Extension Methods

    LinqExtensions.IsOneOf<T>(T, T[])
    In This Article
    Back to top Copyright (c) 2012-2025 fo-dicom contributors