@Test public void testReadInt() throws Exception { ByteBuffer buffer = ByteBuffer.allocate(4); buffer.asIntBuffer().put(0); assertEquals(0, CodingUtil.readInt(buffer.array())); buffer.position(0); buffer.asIntBuffer().put(Integer.MAX_VALUE); assertEquals(Integer.MAX_VALUE, CodingUtil.readInt(buffer.array())); buffer.position(0); buffer.asIntBuffer().put(46517); assertEquals(46517, CodingUtil.readInt(buffer.array())); buffer.position(0); buffer.asIntBuffer().put(Integer.MIN_VALUE); assertEquals(Integer.MIN_VALUE, CodingUtil.readInt(buffer.array())); }
public static int readInt(byte[] buffer) { return (((buffer[3] & 0xff)) | ((buffer[2] & 0xff) << 8) | ((buffer[1] & 0xff) << 16) | ((buffer[0] & 0xff) << 24)); }
CodingUtil { public static int readInt(byte[] buffer) { return (((buffer[3] & 0xff)) | ((buffer[2] & 0xff) << 8) | ((buffer[1] & 0xff) << 16) | ((buffer[0] & 0xff) << 24)); } }
CodingUtil { public static int readInt(byte[] buffer) { return (((buffer[3] & 0xff)) | ((buffer[2] & 0xff) << 8) | ((buffer[1] & 0xff) << 16) | ((buffer[0] & 0xff) << 24)); }  }
CodingUtil { public static int readInt(byte[] buffer) { return (((buffer[3] & 0xff)) | ((buffer[2] & 0xff) << 8) | ((buffer[1] & 0xff) << 16) | ((buffer[0] & 0xff) << 24)); }  static long readLong(byte[] buffer); static int readInt(byte[] buffer); static short readShort(byte[] buffer); }
CodingUtil { public static int readInt(byte[] buffer) { return (((buffer[3] & 0xff)) | ((buffer[2] & 0xff) << 8) | ((buffer[1] & 0xff) << 16) | ((buffer[0] & 0xff) << 24)); }  static long readLong(byte[] buffer); static int readInt(byte[] buffer); static short readShort(byte[] buffer);  }