bin The binary structure to receive bytes.
len The length of the buffer.
Retrieves the current value into a binary buffer, casting as required.
If the buffer is too small, then the value is truncated. Up to len characters are copied to the given buffer.