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
    Object
    EvenLengthBuffer
    Implements
    IByteBuffer
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Dicom.IO.Buffer
    Assembly: cs.temp.dll.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
    Byte[]

    IsMemory

    Gets whether the buffer is held in memory.

    Declaration
    public bool IsMemory { get; }
    Property Value
    Type Description
    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
    Int64

    Methods

    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)

    Gets a subset of the data.

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

    Offset from beginning of data array.

    Int32 count

    Number of bytes to return.

    Returns
    Type Description
    Byte[]

    Requested sub-range of the array.

    Remarks

    Allows for reach to the padded byte at the end of the even length buffer.

    Implements

    IByteBuffer
    In This Article
    Back to top Copyright (c) 2012-2021 fo-dicom contributors