toShortArray

Returns element as a ByteArray, converting scalar types when possible.

Return

element as ByteArray or empty ByteArray if fail.