Class CdrReader
A CDR decoder, which reads primitives back in the order written.
public sealed class CdrReader : IDisposable
- Inheritance
-
CdrReader
- Implements
- Inherited Members
Remarks
Reading past the end returns null rather than throwing, because a short
buffer is a wire condition rather than a programming error.
Constructors
CdrReader(ReadOnlySpan<byte>)
Creates a decoder over encoded bytes.
public CdrReader(ReadOnlySpan<byte> data)
Parameters
dataReadOnlySpan<byte>The encoded bytes.
Exceptions
- PamojaException
The bytes carry no valid CDR encapsulation header.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
ReadDouble()
Reads the next 64-bit float.
public double? ReadDouble()
Returns
- double?
The value, or
nullonce exhausted.
ReadInt32()
Reads the next 32-bit signed integer.
public int? ReadInt32()
Returns
- int?
The value, or
nullonce exhausted.
ReadSingle()
Reads the next 32-bit float.
public float? ReadSingle()
Returns
- float?
The value, or
nullonce exhausted.
ReadUInt32()
Reads the next 32-bit unsigned integer.
public uint? ReadUInt32()
Returns
- uint?
The value, or
nullonce exhausted.