MCPcopy Create free account
hub / github.com/cconlon/kerberos-java-gssapi / byteArrayToInt

Method byteArrayToInt

examples/GssUtil.java:167–176  ·  view source on GitHub ↗
(byte[] data)

Source from the content-addressed store, hash-verified

165
166 /* Based on http://snippets.dzone.com/posts/show/93 */
167 public static int byteArrayToInt(byte[] data)
168 {
169 if (data == null || data.length != 4) return 0x0;
170 return (int)(
171 (0xff & data[0]) << 24 |
172 (0xff & data[1]) << 16 |
173 (0xff & data[2]) << 8 |
174 (0xff & data[3]) << 0
175 );
176 }
177
178 public static void printSubString(String first, String second) {
179 System.out.printf(" | %-18s= %s\n", first, second);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected