Class CompositeByteBuffer
- Namespace
- FellowOakDicom.IO.Buffer
- Assembly
- fo-dicom.core.dll
Implementation of an IByteBuffer consisting of a collection of IByteBuffer instances.
public class CompositeByteBuffer : IByteBuffer
- Inheritance
-
CompositeByteBuffer
- Implements
- Inherited Members
- Extension Methods
Constructors
CompositeByteBuffer(params IByteBuffer[])
Initializes an instance of the CompositeByteBuffer class.
public CompositeByteBuffer(params IByteBuffer[] buffers)
Parameters
buffers
IByteBuffer[]Array of buffers to initially constitute the CompositeByteBuffer instance.
CompositeByteBuffer(IMemoryProvider, params IByteBuffer[])
Initializes an instance of the CompositeByteBuffer class.
public CompositeByteBuffer(IMemoryProvider memoryProvider, params IByteBuffer[] buffers)
Parameters
memoryProvider
IMemoryProviderThe memory provider that will be used to allocate buffers
buffers
IByteBuffer[]Array of buffers to initially constitute the CompositeByteBuffer instance.
CompositeByteBuffer(IMemoryProvider, IEnumerable<IByteBuffer>)
Initializes an instance of the CompositeByteBuffer class.
public CompositeByteBuffer(IMemoryProvider memoryProvider, IEnumerable<IByteBuffer> buffers)
Parameters
memoryProvider
IMemoryProviderThe memory provider that will be used to allocate buffers
buffers
IEnumerable<IByteBuffer>Collection of buffers to initially constitute the CompositeByteBuffer instance.
CompositeByteBuffer(IEnumerable<IByteBuffer>)
Initializes an instance of the CompositeByteBuffer class.
public CompositeByteBuffer(IEnumerable<IByteBuffer> buffers)
Parameters
buffers
IEnumerable<IByteBuffer>Collection of buffers to initially constitute the CompositeByteBuffer instance.
Properties
Buffers
Gets the collection of IByteBuffer constituting the CompositeByteBuffer.
public IList<IByteBuffer> Buffers { get; }
Property Value
Data
Gets the data.
public byte[] Data { get; }
Property Value
- byte[]
IsMemory
Gets whether data is buffered in memory or not.
public bool IsMemory { get; }
Property Value
Size
Gets the size of the buffered data.
public long Size { get; }
Property Value
Methods
CopyToStream(Stream)
Copies the contents of this buffer to the provided stream
public void CopyToStream(Stream stream)
Parameters
stream
StreamA 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
StreamA stream that will receive the contents of this buffer
cancellationToken
CancellationTokenA cancellation token that halts the execution of the copy operation
Returns
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)