Proton DotNet
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder Class Referencesealed
Inheritance diagram for Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder:
Apache.Qpid.Proton.Codec.IStreamDecoder

Public Member Functions

IStreamDecoderState NewDecoderState ()
 Creates and returns a new decoder state object that should be used when decoding values with the decoder instance.
 
bool? ReadBoolean (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
bool ReadBoolean (Stream stream, IStreamDecoderState state, bool defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
sbyte? ReadByte (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
sbyte ReadByte (Stream stream, IStreamDecoderState state, sbyte defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
byte? ReadUnsignedByte (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
byte ReadUnsignedByte (Stream stream, IStreamDecoderState state, byte defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
char? ReadCharacter (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
char ReadCharacter (Stream stream, IStreamDecoderState state, char defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
Decimal32 ReadDecimal32 (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
Decimal64 ReadDecimal64 (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
Decimal128 ReadDecimal128 (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
short? ReadShort (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
short ReadShort (Stream stream, IStreamDecoderState state, short defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ushort? ReadUnsignedShort (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ushort ReadUnsignedShort (Stream stream, IStreamDecoderState state, ushort defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
int? ReadInt (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
int ReadInt (Stream stream, IStreamDecoderState state, int defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
uint? ReadUnsignedInteger (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
uint ReadUnsignedInteger (Stream stream, IStreamDecoderState state, uint defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
long? ReadLong (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
long ReadLong (Stream stream, IStreamDecoderState state, long defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ulong? ReadUnsignedLong (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ulong ReadUnsignedLong (Stream stream, IStreamDecoderState state, ulong defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
float? ReadFloat (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
float ReadFloat (Stream stream, IStreamDecoderState state, float defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
double? ReadDouble (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
double ReadDouble (Stream stream, IStreamDecoderState state, double defaultValue)
 Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
IProtonBuffer ReadBinary (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
string ReadString (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
Symbol ReadSymbol (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
string ReadSymbolAsString (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ulong? ReadTimestamp (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
Guid? ReadGuid (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
IDictionary< K, V > ReadMap< K, V > (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
IList< T > ReadList< T > (Stream stream, IStreamDecoderState state)
 
object ReadObject (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
ReadObject< T > (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
T[] ReadMultiple< T > (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 
IDeliveryTag ReadDeliveryTag (Stream stream, IStreamDecoderState state)
 This method expects to read a Binary encoded type from the provided stream and constructs a IDeliveryTag type that wraps the bytes encoded. If the encoding is NULL AMQP type then this method returns null.
 
IStreamTypeDecoder ReadNextTypeDecoder (Stream stream, IStreamDecoderState state)
 Reads from the given IProtonstream instance and returns a ITypeDecoder that can read the next encoded AMQP type from the byte stream. If an error occurs while attempting to read the encoded type a DecodeException is thrown.
 
IStreamTypeDecoder PeekNextTypeDecoder (Stream stream, IStreamDecoderState state)
 Peeks ahead in the given IProtonstream instance and returns a ITypeDecoder that can read the next encoded AMQP type from the byte stream. If an error occurs while attempting to read the encoded type a DecodeException is thrown. The underlying stream state is not modified as a result of calling the peek ahead operation and the returned decoder will not correctly be able to read the encoded type until the type encoding bytes are read.
 
IStreamDecoder RegisterDescribedTypeDecoder (IStreamDescribedTypeDecoder decoder)
 Allows for a custom described type decoder to be registered with this decoder instance for use when decoding AMQP described types from incoming byte streams.
 
- Public Member Functions inherited from Apache.Qpid.Proton.Codec.IStreamDecoder
IList< V > ReadList< V > (Stream stream, IStreamDecoderState state)
 Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.
 

Properties

IStreamDecoderState CachedDecoderState [get]
 Returns a cached decoder state instance that can be used be single threaded readers that use this decoder instance.
 
- Properties inherited from Apache.Qpid.Proton.Codec.IStreamDecoder

Member Function Documentation

◆ NewDecoderState()

IStreamDecoderState Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.NewDecoderState ( )
inline

Creates and returns a new decoder state object that should be used when decoding values with the decoder instance.

Returns

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ PeekNextTypeDecoder()

IStreamTypeDecoder Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.PeekNextTypeDecoder ( Stream  stream,
IStreamDecoderState  state 
)
inline

Peeks ahead in the given IProtonstream instance and returns a ITypeDecoder that can read the next encoded AMQP type from the byte stream. If an error occurs while attempting to read the encoded type a DecodeException is thrown. The underlying stream state is not modified as a result of calling the peek ahead operation and the returned decoder will not correctly be able to read the encoded type until the type encoding bytes are read.

Template Parameters
TThe type that the decoder handles
Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadBinary()

IProtonBuffer Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadBinary ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadBoolean() [1/2]

bool? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadBoolean ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadBoolean() [2/2]

bool Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadBoolean ( Stream  stream,
IStreamDecoderState  state,
bool  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadByte() [1/2]

sbyte? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadByte ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadByte() [2/2]

sbyte Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadByte ( Stream  stream,
IStreamDecoderState  state,
sbyte  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadCharacter() [1/2]

char? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadCharacter ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadCharacter() [2/2]

char Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadCharacter ( Stream  stream,
IStreamDecoderState  state,
char  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadDecimal128()

Decimal128 Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadDecimal128 ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadDecimal32()

Decimal32 Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadDecimal32 ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadDecimal64()

Decimal64 Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadDecimal64 ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadDeliveryTag()

IDeliveryTag Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadDeliveryTag ( Stream  stream,
IStreamDecoderState  state 
)
inline

This method expects to read a Binary encoded type from the provided stream and constructs a IDeliveryTag type that wraps the bytes encoded. If the encoding is NULL AMQP type then this method returns null.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadDouble() [1/2]

double? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadDouble ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadDouble() [2/2]

double Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadDouble ( Stream  stream,
IStreamDecoderState  state,
double  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadFloat() [1/2]

float? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadFloat ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadFloat() [2/2]

float Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadFloat ( Stream  stream,
IStreamDecoderState  state,
float  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadGuid()

Guid? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadGuid ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadInt() [1/2]

int? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadInt ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadInt() [2/2]

int Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadInt ( Stream  stream,
IStreamDecoderState  state,
int  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadLong() [1/2]

long? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadLong ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadLong() [2/2]

long Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadLong ( Stream  stream,
IStreamDecoderState  state,
long  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadMap< K, V >()

IDictionary< K, V > Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadMap< K, V > ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadMultiple< T >()

T[] Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadMultiple< T > ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadNextTypeDecoder()

IStreamTypeDecoder Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadNextTypeDecoder ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads from the given IProtonstream instance and returns a ITypeDecoder that can read the next encoded AMQP type from the byte stream. If an error occurs while attempting to read the encoded type a DecodeException is thrown.

Template Parameters
TThe type that the decoder handles
Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadObject()

object Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadObject ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadObject< T >()

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadShort() [1/2]

short? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadShort ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadShort() [2/2]

short Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadShort ( Stream  stream,
IStreamDecoderState  state,
short  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadString()

string Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadString ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadSymbol()

Symbol Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadSymbol ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadSymbolAsString()

string Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadSymbolAsString ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadTimestamp()

ulong? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadTimestamp ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadUnsignedByte() [1/2]

byte? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadUnsignedByte ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadUnsignedByte() [2/2]

byte Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadUnsignedByte ( Stream  stream,
IStreamDecoderState  state,
byte  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadUnsignedInteger() [1/2]

uint? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadUnsignedInteger ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadUnsignedInteger() [2/2]

uint Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadUnsignedInteger ( Stream  stream,
IStreamDecoderState  state,
uint  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadUnsignedLong() [1/2]

ulong? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadUnsignedLong ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadUnsignedLong() [2/2]

ulong Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadUnsignedLong ( Stream  stream,
IStreamDecoderState  state,
ulong  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadUnsignedShort() [1/2]

ushort? Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadUnsignedShort ( Stream  stream,
IStreamDecoderState  state 
)
inline

Reads the encoded value from the given byte stream and returns it. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ ReadUnsignedShort() [2/2]

ushort Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.ReadUnsignedShort ( Stream  stream,
IStreamDecoderState  state,
ushort  defaultValue 
)
inline

Reads the encoded value from the given byte stream and returns it or the default if the encoding type is null. If the next value in the byte stream is not of the requested type an error is thrown. If the caller wishes to recover from errors due to unexpected types the byte stream should be marked and reset in order to make additional read attempts.

Parameters
streamThe stream to read the encoded value from
stateA decoder state instance to use when decoding
defaultValueThe default value to return for null encodings
Returns
The decoded object or null if the encoding was null.
Exceptions
DecodeExceptionIf an error occurs during the decode operation

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

◆ RegisterDescribedTypeDecoder()

IStreamDecoder Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.RegisterDescribedTypeDecoder ( IStreamDescribedTypeDecoder  decoder)
inline

Allows for a custom described type decoder to be registered with this decoder instance for use when decoding AMQP described types from incoming byte streams.

Parameters
decoderA described type decoder to register
Returns
This IDecoder instance.

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.

Property Documentation

◆ CachedDecoderState

IStreamDecoderState Apache.Qpid.Proton.Codec.Decoders.ProtonStreamDecoder.CachedDecoderState
get

Returns a cached decoder state instance that can be used be single threaded readers that use this decoder instance.

Returns
A cached decoder state object that can be used by single threaded readerss

Implements Apache.Qpid.Proton.Codec.IStreamDecoder.


The documentation for this class was generated from the following file: