public FritzBoxFirmware(String firmware) throws InvalidFirmwareException { String mod = ""; if (firmware == null) throw new InvalidFirmwareException("No firmware found"); if (firmware.indexOf("mod")>0) { mod = firmware.substring(firmware.indexOf("mod")); firmware = firmware.substring(0, firmware.indexOf("mod")); } String[] parts = firmware.split("\\."); if (parts.length != 3) throw new InvalidFirmwareException("Firmware number crippled");  this.boxtype = Byte.parseByte(parts[0]); this.majorFirmwareVersion = Byte.parseByte(parts[1]); this.minorFirmwareVersion = Byte.parseByte(parts[2]); this.modFirmwareVersion = mod;
public FritzBoxFirmware(byte boxtype, byte majorFirmwareVersion, byte minorFirmwareVersion) { this.boxtype = boxtype; this.majorFirmwareVersion = majorFirmwareVersion; this.minorFirmwareVersion = minorFirmwareVersion; this.modFirmwareVersion = "";
	public FritzBoxFirmware(String firmware) throws InvalidFirmwareException {		String mod = "";		if (firmware == null)			throw new InvalidFirmwareException("No firmware found");		if (firmware.indexOf("mod")>0) {			mod = firmware.substring(firmware.indexOf("mod"));			firmware = firmware.substring(0, firmware.indexOf("mod"));		}		String[] parts = firmware.split("\\.");		if (parts.length != 3)			throw new InvalidFirmwareException("Firmware number crippled");		this.boxtype = Byte.parseByte(parts[0]);		this.majorFirmwareVersion = Byte.parseByte(parts[1]);		this.minorFirmwareVersion = Byte.parseByte(parts[2]);		this.modFirmwareVersion = mod;	}