Table of Contents

Class SwapByteBuffer

Namespace
FellowOakDicom.IO.Buffer
Assembly
fo-dicom.core.dll
public class SwapByteBuffer : IByteBuffer
Inheritance
SwapByteBuffer
Implements
Inherited Members
Extension Methods

Constructors

SwapByteBuffer(IByteBuffer, int)

public SwapByteBuffer(IByteBuffer buffer, int unitSize)

Parameters

buffer IByteBuffer
unitSize int

SwapByteBuffer(IByteBuffer, int, IMemoryProvider)

public SwapByteBuffer(IByteBuffer buffer, int unitSize, IMemoryProvider memoryProvider)

Parameters

buffer IByteBuffer
unitSize int
memoryProvider IMemoryProvider

Properties

Data

Gets the data.

public byte[] Data { get; }

Property Value

byte[]

Internal

public IByteBuffer Internal { get; }

Property Value

IByteBuffer

IsMemory

Gets whether data is buffered in memory or not.

public bool IsMemory { get; }

Property Value

bool

Size

Gets the size of the buffered data.

public long Size { get; }

Property Value

long

UnitSize

public int UnitSize { get; }

Property Value

int

Methods

CopyToStream(Stream)

Copies the contents of this buffer to the provided stream

public void CopyToStream(Stream stream)

Parameters

stream Stream

A stream that will receive the contents of this buffer

CopyToStreamAsync(Stream, CancellationToken)

Copies the contents of this buffer to the provided stream

public Task CopyToStreamAsync(Stream stream, CancellationToken cancellationToken)

Parameters

stream Stream

A stream that will receive the contents of this buffer

cancellationToken CancellationToken

A cancellation token that halts the execution of the copy operation

Returns

Task

GetByteRange(long, int, byte[])

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

public void GetByteRange(long offset, int count, byte[] output)

Parameters

offset long

Offset from beginning of data array.

count int

Number of bytes to return.

output byte[]

The array where the data will be written to