Class BulkDataUriByteBuffer
Byte buffer representing a Bulk Data byte buffer, e.g. as in the DICOM Json model, in PS3.18 Chapter F.2.2.
Inheritance
System.Object
BulkDataUriByteBuffer
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 BulkDataUriByteBuffer : IBulkDataUriByteBuffer, IByteBuffer
Constructors
BulkDataUriByteBuffer(String)
Initialize the BulkData URI Byte Buffer
Declaration
public BulkDataUriByteBuffer(string bulkDataUri)
Parameters
Type | Name | Description |
---|---|---|
System.String | bulkDataUri | The URI for retrieving the referenced bulk data. |
Properties
BulkDataUri
The URI for retrieving the referenced bulk data.
Declaration
public string BulkDataUri { get; }
Property Value
Type | Description |
---|---|
System.String |
Data
Gets or sets the bulk data. Throws an InvalidOperationException if the Data has not been set.
Declaration
public virtual byte[] Data { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
IsMemory
Gets whether data is buffered in memory or not.
Declaration
public bool IsMemory { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Size
Gets the size of the buffered data. Throws an InvalidOperationException if the Data has not been set.
Declaration
public virtual long Size { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
CopyToStream(Stream)
Declaration
public void CopyToStream(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream |
CopyToStreamAsync(Stream, CancellationToken)
Declaration
public Task CopyToStreamAsync(Stream stream, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
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 |