Fellow Oak DICOM
Search Results for

    Show / Hide Table of Contents

    Class EndianByteBuffer

    Representation of an endian-aware byte buffer.

    Inheritance
    System.Object
    EndianByteBuffer
    Implements
    IByteBuffer
    Inherited Members
    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.Buffer
    Assembly: fo-dicom.core.dll
    Syntax
    public class EndianByteBuffer : IByteBuffer

    Properties

    Data

    Gets the data.

    Declaration
    public byte[] Data { get; }
    Property Value
    Type Description
    System.Byte[]

    Endian

    Gets the endianness of the byte buffer.

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

    Internal

    Gets the original representation of the byte buffer.

    Declaration
    public IByteBuffer Internal { get; }
    Property Value
    Type Description
    IByteBuffer

    IsMemory

    Gets whether data is buffered in memory or not.

    Declaration
    public bool IsMemory { get; }
    Property Value
    Type Description
    System.Boolean

    Size

    Gets the size of the buffered data.

    Declaration
    public long Size { get; }
    Property Value
    Type Description
    System.Int64

    UnitSize

    Gets the unit size of the components in the byte buffer, typically 1 for bytes and 2 for words.

    Declaration
    public int UnitSize { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    CopyToStream(Stream)

    Declaration
    public void CopyToStream(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    CopyToStreamAsync(Stream, CancellationToken)

    Declaration
    public async Task CopyToStreamAsync(Stream stream, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.IO.Stream stream
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task

    Create(IByteBuffer, Endian, Int32)

    Creates a IByteBuffer accounting for endianness and unit size.

    Declaration
    public static IByteBuffer Create(IByteBuffer buffer, Endian endian, int unitSize)
    Parameters
    Type Name Description
    IByteBuffer buffer

    Original byte buffer.

    Endian endian

    Requested endianness.

    System.Int32 unitSize

    Unit size of the individual components in the buffer.

    Returns
    Type Description
    IByteBuffer

    If required given the endian of the local machine and the byte buffer unitSize, creates an instance of the EndianByteBuffer class, otherwise returns the original buffer.

    GetByteRange(Int64, Int32, Byte[])

    Declaration
    public void GetByteRange(long offset, int count, byte[] output)
    Parameters
    Type Name Description
    System.Int64 offset
    System.Int32 count
    System.Byte[] output

    Implements

    IByteBuffer

    Extension Methods

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