code: public static byte[] i2cReadRequest(byte slaveAddress, int register, int bytesToRead, boolean continuous) {
          byte command;
          byte[] message;
          if (continuous) {
              command = I2C_READ_CONTINUOUS;
          } else {
              command = I2C_READ;
          }
          //TODO replace hardcoded slave address (MSB) with generated one to support 10-bit mode
          // see https://github.com/firmata/protocol/blob/master/i2c.md
          if (register == FirmataI2CDevice.REGISTER_NOT_SET) {
              message = new byte[]{
                  START_SYSEX, I2C_REQUEST,
                  slaveAddress, command,
                  (byte) (bytesToRead & 0x7F), (byte) ((bytesToRead >>> 7) & 0x7F),
                  END_SYSEX
              };
          } else {
              message = new byte[]{
                  START_SYSEX, I2C_REQUEST,
                  slaveAddress, command,
                  (byte) (register & 0x7F), (byte) ((register >>> 7) & 0x7F),
                  (byte) (bytesToRead & 0x7F), (byte) ((bytesToRead >>> 7) & 0x7F),
                  END_SYSEX
              };
          }
          return message;
      }
docs: Builds a message that asks a Firmata device to read data from an I2C
  device. <b>Does not support 10-bit mode.</b>
  
  @param slaveAddress address of the I2C device you want to talk to
  @param register The device register to read from.
  @param bytesToRead the number of bytes that the device will return
  @param continuous repeatedly send updates until asked to stop
  @return the message