public TryReadBytes ( int maxLength, byte &value ) : bool | ||
maxLength | int | |
value | byte | |
return | bool |
public bool TryReadBytes(int maxLength, out byte[] value)
{
int length = (int)Read7BitUInt32();
if (length < 0 || length > maxLength)
{
value = null;
return false;
}
value = ReadBytes(length);
return true;
}