Fellow Oak DICOM
Search Results for

    Show / Hide Table of Contents

    Class EvenLengthBuffer

    Wrapper class for uneven length buffers that needs to be represented as even length buffers.

    Inheritance
    System.Object
    EvenLengthBuffer
    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 EvenLengthBuffer : IByteBuffer

    Properties

    Buffer

    Underlying uneven length buffer.

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

    Data

    Gets the buffer data, which is equal to the underlying buffer data plus a padding byte at the end.

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

    IsMemory

    Gets whether the buffer is held in memory.

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

    Size

    Gets the size of the even length buffer, which is always equal to the underlying (uneven length) buffer plus 1.

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

    Methods

    CopyToStream(Stream)

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

    CopyToStreamAsync(Stream, CancellationToken)

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

    Create(IByteBuffer)

    If necessary, creates an even length buffer for the specified buffer.

    Declaration
    public static IByteBuffer Create(IByteBuffer buffer)
    Parameters
    Type Name Description
    IByteBuffer buffer

    Buffer that is required to be of even length.

    Returns
    Type Description
    IByteBuffer

    If buffer is of uneven length, returns an even length buffer wrapping the buffer, otherwise returns the buffer itself.

    GetByteRange(Int64, Int32, Byte[])

    Gets a subset of the data and fills it in the provided output buffer

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

    Offset from beginning of data array.

    System.Int32 count

    Number of bytes to return.

    System.Byte[] output

    The array where the data will be written to

    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