UnpackingUnpackString Method (Stream, Encoding) |
Namespace: MsgPack
Exception | Condition |
---|---|
ArgumentNullException | source is null. Or encoding is null. |
ArgumentException | The CanRead of source is false. |
UnpackException | source is not valid MessagePack stream. Note that the state of source will be unpredictable espicially it is not seekable. |
MessageTypeException | The unpacked result in the source is not raw binary. Or, the unpacked result in the source is invalid as specified encoding byte stream. Note that the state of source will be unpredictable espicially it is not seekable. |
The processed bytes count can be calculated via Position of source when the CanSeek is true.
When the type of packed value is not known, use UnpackObject(Stream) instead.