private int generateUpdate(BufferedWriter out, Object fileToModify, int fileSize) throws IOException {

		ModificationPart modificationPart = this.getModificationPart();

		int bs1, bs2, bs3, dataModified = 0;

		switch (modificationPart) {
		case B:
		case E:
		case M:
			bs1 = this.getRealisticByteModification(fileSize, modificationPart);
			dataModified = this.modifyFile(out, fileToModify, fileSize, bs1);
			break;
		case BE:
			bs1 = this.getRealisticByteModification(fileSize, ModificationPart.B);
			bs2 = this.getRealisticByteModification(fileSize, ModificationPart.E);
			dataModified = this.modifyFile(out, fileToModify, fileSize, bs1, bs2);
			break;
		case BM:
			bs1 = this.getRealisticByteModification(fileSize, ModificationPart.B);
			bs2 = this.getRealisticByteModification(fileSize, ModificationPart.M);
			dataModified = this.modifyFile(out, fileToModify, fileSize, bs1, bs2);
			break;
		case ME:
			bs1 = this.getRealisticByteModification(fileSize, ModificationPart.M);
			bs2 = this.getRealisticByteModification(fileSize, ModificationPart.E);
			dataModified = this.modifyFile(out, fileToModify, fileSize, bs1, bs2);
			break;
		case BEM:
			bs1 = this.getRealisticByteModification(fileSize, ModificationPart.B);
			bs2 = this.getRealisticByteModification(fileSize, ModificationPart.E);
			bs3 = this.getRealisticByteModification(fileSize, ModificationPart.M);
			dataModified = this.modifyFile(out, fileToModify, fileSize, bs1, bs2, bs3);
			break;
		}

		return dataModified;
	}