UnpackingUnpackString Method (Byte, Int32, Encoding) |
Namespace: MsgPack
public static UnpackingResult<string> UnpackString( byte[] source, int offset, Encoding encoding )
Exception | Condition |
---|---|
ArgumentNullException | source is null. Or, encoding is null. |
ArgumentException | source is empty. Or, the length of source is not greater than offset. |
ArgumentOutOfRangeException | offset is negative value. |
UnpackException | source is not valid MessagePack stream. |
MessageTypeException | The unpacked result in the source is not compatible to String. Or, the unpacked result in the source is invalid as specified encoding byte stream. |
Invocation of this method is equivalant to call UnpackString(Byte, Int32) with offset is 0.
When the type of packed value is not known, use UnpackObject(Byte) instead.