(byte[] data)
| 217 | |
| 218 | /* Based on http://snippets.dzone.com/posts/show/93 */ |
| 219 | public static int byteArrayToInt(byte[] data) |
| 220 | { |
| 221 | if (data == null || data.length != 4) return 0x0; |
| 222 | return (int)( |
| 223 | (0xff & data[0]) << 24 | |
| 224 | (0xff & data[1]) << 16 | |
| 225 | (0xff & data[2]) << 8 | |
| 226 | (0xff & data[3]) << 0 |
| 227 | ); |
| 228 | } |
| 229 | |
| 230 | public static void printSubString(String first, String second) { |
| 231 | System.out.printf(" | %-18s= %s\n", first, second); |
no outgoing calls
no test coverage detected