Class EndianByteBuffer
Representation of an endian-aware byte buffer.
Implements
Inherited Members
Namespace: Dicom.IO.Buffer
Assembly: cs.temp.dll.dll
Syntax
public class EndianByteBuffer : IByteBuffer
Properties
Data
Gets the data.
Declaration
public byte[] Data { get; }
Property Value
| Type | Description |
|---|---|
| Byte[] |
Endian
Gets the endianness of the byte buffer.
Declaration
public Endian Endian { get; }
Property Value
| Type | Description |
|---|---|
| Endian |
Internal
Gets the original representation of the byte buffer.
Declaration
public IByteBuffer Internal { get; }
Property Value
| Type | Description |
|---|---|
| IByteBuffer |
IsMemory
Gets whether data is buffered in memory or not.
Declaration
public bool IsMemory { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Size
Gets the size of the buffered data.
Declaration
public long Size { get; }
Property Value
| Type | Description |
|---|---|
| Int64 |
UnitSize
Gets the unit size of the components in the byte buffer, typically 1 for bytes and 2 for words.
Declaration
public int UnitSize { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Methods
Create(IByteBuffer, Endian, Int32)
Creates a IByteBuffer accounting for endianness and unit size.
Declaration
public static IByteBuffer Create(IByteBuffer buffer, Endian endian, int unitSize)
Parameters
| Type | Name | Description |
|---|---|---|
| IByteBuffer | buffer | Original byte buffer. |
| Endian | endian | Requested endianness. |
| Int32 | unitSize | Unit size of the individual components in the |
Returns
| Type | Description |
|---|---|
| IByteBuffer | If required given the |
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 |