Method
putWordBE
(byte[] buf, int off, int val)
Source from the content-addressed store, hash-verified
| 196 | } |
| 197 | // Puts the specified word (val) into the buffer (buf) at position off using big endian byte ordering |
| 198 | public static void putWordBE(byte[] buf, int off, int val) { |
| 199 | buf[off] = (byte) ((val >> 8) & 0x000000FF); |
| 200 | buf[++off] = (byte) ((val) & 0x000000FF); |
| 201 | } |
| 202 | |
| 203 | public static int getWordBE(byte[] buf, int off) { |
| 204 | int val = (((int) buf[off]) << 8) & 0x0000FF00; |
Tested by
no test coverage detected