Class EvenLengthBuffer
Wrapper class for uneven length buffers that needs to be represented as even length buffers.
Implements
Inherited Members
Namespace: Dicom.IO.Buffer
Assembly: cs.temp.dll.dll
Syntax
public class EvenLengthBuffer : IByteBuffer
Properties
Buffer
Underlying uneven length buffer.
Declaration
public IByteBuffer Buffer { get; }
Property Value
Type | Description |
---|---|
IByteBuffer |
Data
Gets the buffer data, which is equal to the underlying buffer data plus a padding byte at the end.
Declaration
public byte[] Data { get; }
Property Value
Type | Description |
---|---|
Byte[] |
IsMemory
Gets whether the buffer is held in memory.
Declaration
public bool IsMemory { get; }
Property Value
Type | Description |
---|---|
Boolean |
Size
Gets the size of the even length buffer, which is always equal to the underlying (uneven length) buffer plus 1.
Declaration
public long Size { get; }
Property Value
Type | Description |
---|---|
Int64 |
Methods
Create(IByteBuffer)
If necessary, creates an even length buffer for the specified buffer
.
Declaration
public static IByteBuffer Create(IByteBuffer buffer)
Parameters
Type | Name | Description |
---|---|---|
IByteBuffer | buffer | Buffer that is required to be of even length. |
Returns
Type | Description |
---|---|
IByteBuffer | If |
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 |
Remarks
Allows for reach to the padded byte at the end of the even length buffer.