Creates a new byte array containing a big-endian 2-byte short integer. @param n A short integer. @return A new byte array containing the given value.
(final short n)
| 137 | * @return A new byte array containing the given value. |
| 138 | */ |
| 139 | public static byte[] fromShort(final short n) { |
| 140 | final byte[] b = new byte[2]; |
| 141 | setShort(b, n); |
| 142 | return b; |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * Reads a big-endian 4-byte integer from the begining of the given array. |