Class BulkDataUriByteBuffer
- Namespace
- FellowOakDicom.IO.Buffer
- Assembly
- fo-dicom.core.dll
Byte buffer representing a Bulk Data byte buffer, e.g. as in the DICOM Json model, in PS3.18 Chapter F.2.2.
public class BulkDataUriByteBuffer : IBulkDataUriByteBuffer, IByteBuffer
- Inheritance
-
BulkDataUriByteBuffer
- Implements
- Inherited Members
- Extension Methods
Constructors
BulkDataUriByteBuffer(string)
Initialize the BulkData URI Byte Buffer
public BulkDataUriByteBuffer(string bulkDataUri)
Parameters
bulkDataUri
stringThe URI for retrieving the referenced bulk data.
Properties
BulkDataUri
The URI for retrieving the referenced bulk data.
public string BulkDataUri { get; }
Property Value
Data
Gets or sets the bulk data. Throws an InvalidOperationException if the Data has not been set.
public virtual byte[] Data { get; set; }
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. Throws an InvalidOperationException if the Data has not been set.
public virtual 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)