MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / putWordBE

Method putWordBE

src/main/java/util/StringUtils.java:198–201  ·  view source on GitHub ↗
(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;

Callers 1

askInetSrvMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected