(byte[] bytes)
| 367 | |
| 368 | |
| 369 | public static int bytes2Int(byte[] bytes) { |
| 370 | int int1 = bytes[3] & 0xff; |
| 371 | int int2 = (bytes[2] & 0xff) << 8; |
| 372 | int int3 = (bytes[1] & 0xff) << 16; |
| 373 | int int4 = (bytes[0] & 0xff) << 24; |
| 374 | |
| 375 | return int1 | int2 | int3 | int4; |
| 376 | } |
| 377 | |
| 378 | public static byte[] BytesCapture(byte[] src, int offset, int length) { |
| 379 | byte[] result = new byte[length]; |
no outgoing calls
no test coverage detected