int buttons = data[0] & 7;  int x = data[1] & 0xff; if ((data[0] & 0x10) != 0) { x = x - 256;
final int d0 = data[0] & 0xFF; final int d1 = data[1] & 0xFF; final int d2 = data[2] & 0xFF;  final int buttons = d0 & BIT_BUTTON_MASK; final int x; final int y; if ((d0 & BIT_X_SIGN) != 0) { x = d1 - 256; } else { x = d1;
	public PointerEvent buildEvent(byte[] data) {		int buttons = data[0] & 7; // left, middle, right		int x = data[1] & 0xff;		if ((data[0] & 0x10) != 0) {			x = x - 256;		}		int y = data[2] & 0xff;		if ((data[0] & 0x20) != 0) {			y = y - 256;		}		return new PointerEvent(buttons, x, y, PointerEvent.RELATIVE);	}