MCPcopy Create free account
hub / github.com/demoth/jake2 / getIntBytes

Method getIntBytes

qcommon/src/main/java/jake2/qcommon/util/Lib.java:274–281  ·  view source on GitHub ↗

Converts an int to 4 bytes java representation.

(int c)

Source from the content-addressed store, hash-verified

272
273 /** Converts an int to 4 bytes java representation. */
274 public static byte[] getIntBytes(int c) {
275 byte b[] = new byte[4];
276 b[0] = (byte) ((c & 0xff));
277 b[1] = (byte) ((c >>> 8) & 0xff);
278 b[2] = (byte) ((c >>> 16) & 0xff);
279 b[3] = (byte) ((c >>> 24) & 0xff);
280 return b;
281 }
282
283 /** Converts an 4 bytes java int representation to an int. */
284 public static int getInt(byte b[]) {

Callers 2

SVCmd_ListIP_fMethod · 0.95
SVCmd_WriteIP_fMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected