docs: @Override
  	public int available() {
  		// In Secure DFU softdevice and bootloader sizes are not provided in the Init file
          // (they are encoded inside the Init file instead). The service doesn't send those sizes,
          // not the whole size of the firmware separately, like it was done in the Legacy DFU.
  		// This method then is just used to log file size.
  
  		// In case of SD+BL in Secure DFU:
  		if (softDeviceAndBootloaderBytes != null && softDeviceSize == 0 && bootloaderSize == 0
  				&& (type & (DfuBaseService.TYPE_SOFT_DEVICE | DfuBaseService.TYPE_BOOTLOADER)) > 0)
  			return softDeviceAndBootloaderBytes.length + applicationImageSize() - bytesRead;
  
  		// Otherwise:
  		return softDeviceImageSize() + bootloaderImageSize() + applicationImageSize() - bytesRead;
  	}