Save the current values of all properties.<br>
<br>
This method will block and wait for the properties to be saved. See
{@link #saveNB()} for a non-blocking version.

@throws IOException
if there is an error while attempting to save the properties
328311
public void save() throws IOException
    {
        try
        {
            Future<Void> task = saveNB();
            task.get();
        }
        catch (ExecutionException e)
        {
            Throwable t = e.getCause();

            if (t instanceof IOException)
            {
                throw (IOException)t;
            }

            throw new IOException(t);
        }
        catch (InterruptedException e)
        {
            throw new IOException("Saving of the properties file \"" + getFile().getAbsolutePath()
                                  + "\" was interrupted.");
        }
    }
421230
public final void setCurrentByte(final int n) {
        if (SwingUtilities.isEventDispatchThread()) {
            setCurrentByteIntern(n);
        } else {
            try {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        setCurrentByteIntern(n);
                    }
                });
            } catch (final Exception ex) {
                ignore();
            }
        }
    }
503411
public void save(Map<String, Object> changedValues) {
        operationDelegate.onSaveResource(IIOP_OPENJDK_SUBSYSTEM_TEMPLATE, null, changedValues,
                new CrudOperationDelegate.Callback() {
                    @Override
                    public void onSuccess(final AddressTemplate addressTemplate, final String name) {
                        Console.info(Console.MESSAGES.modified("IIOP Subsystem"));
                        refresh();
                    }

                    @Override
                    public void onFailure(final AddressTemplate addressTemplate, final String name, final Throwable t) {
                        Console.error(Console.MESSAGES.modificationFailed("IIOP Subsystem"), t.getMessage());
                        refresh();
                    }
                });
    }
1257771
public void saveMapping(final Writer out) throws IOException {
        for ( final Iterator it = this.mapping.getEntries().iterator(); it.hasNext(); ) {
            out.write( it.next().toString() );
            out.write( "\n" );
        }
    }
92094
public void save(File file) throws IOException {

        Writer writer = null;

        try {
            writer = new Writer(file);
            writer.println(toPrettyString());
        } finally {
            if (writer != null) writer.close();
        }
    }
930933
protected function saveNewBinding()
    {
        $modified_properties = $this->getModifiedProperties();

        if (count($modified_properties) === 0) {
            return;
        }

        $fields = array();
        $values = array();

        foreach ($this->getModifiedProperties() as $name => $value) {
            $type = $this->guessType($name, $value);
            $fields[] = sprintf('%s:%s', $type, $name);
            $values[$name] = $value;
        }

        SwatDB::insertRow($this->db, $this->table, $fields, $values);
        $this->flushCacheNamespaces();
    }
1207592
public void save(String saveModelFile) throws IOException {
		System.out.println("save ...");
		ObjectOutputStream out = new ObjectOutputStream(
				new BufferedOutputStream(new GZIPOutputStream(
						new FileOutputStream(saveModelFile))));
		out.writeObject(new Integer(n));
		out.close();
		System.out.println("OK");
	}
542297
public void saveValue()
    {
        PropertyOwner pRegistration = this.retrieveUserProperties();
        if (pRegistration != null) if (pRegistration instanceof UserProperties)
            ((UserProperties)pRegistration).saveField(this.getOwner());
    }
1018138
public synchronized void save(String persistence) {
		try {
			createObjectMapper().writeValue(new File(persistence), tableList);
		} catch (IOException e) {
			e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
		}
	}
362286
public boolean commit() {
        try {
            setWrongValueMessage(null);
            propInfo.setPropertyValue(target, getValue());
            updateValue();
            return true;
        } catch (Exception e) {
            setWrongValueException(e);
            return false;
        }
    }
1180593
public void setValue(String name, String value) {
    	Properties properties = loadProperties();
    	try (
    	    	OutputStream output = new FileOutputStream(file);
        	) {
    	    	properties.setProperty(name, value);
    	    	properties.store(output, "");
    	    	output.close();

        	} catch(IOException e) {
        		logger.warn(String.format("Could not save the keyvalue store, reason:%s", e.getMessage()));
        	}
    }
1338192
public void save(File file) throws IOException {
        try (FileOutputStream out = new FileOutputStream(file)) {
            save(out);
        }
    }
1065986
public void storeProperties(Map<String, String> properties) throws IOException {
        Properties props = new Properties();
        properties.forEach(props::setProperty);
        try (FileOutputStream out = new FileOutputStream(getPropertiesFile())) {
            props.store(out, "");
        }
    }
354608
@Override
	public synchronized void setOption(String name, String value) throws IOException {
		// update the property
		Properties props = getProps();
		if (value == null) {
			props.remove(name);
		} else {
			props.setProperty(name, value);
		}
		setProps(props);
		// Persist the new properties
		saveProps(props);

		long seq = SequenceNumberProvider.incrementAndGetSequenceNumber();
		// Notify update listeners
		updateNotify(seq);
		// Notify options instances using the same properties file
		propsFileUpdateNotify(props, seq);

	}
974289
public void load() throws IOException
    {
        try
        {
            Future<Void> task = loadNB();
            task.get();
        }
        catch (ExecutionException e)
        {
            Throwable t = e.getCause();

            if (t instanceof IOException)
            {
                throw (IOException)t;
            }

            throw new IOException(t);
        }
        catch (InterruptedException e)
        {
            throw new IOException("Loading of the properties file \""
                                        + getFile().getAbsolutePath() + "\" was interrupted.");
        }
    }
1347671
public static ISynchronizationPoint<IOException> savePropertiesFile(
		Properties properties, ICharacterStream.Writable.Buffered output, byte priority, boolean closeStreamAtEnd
	) {
		SavePropertiesFileTask task = new SavePropertiesFileTask(properties, output, priority, closeStreamAtEnd);
		task.start();
		return task.getOutput();
	}
106291
public static void save( File f, Application app ) throws IOException {

		Properties properties = new Properties();
		if( ! Utils.isEmptyOrWhitespaces( app.getDisplayName()))
			properties.setProperty( APPLICATION_NAME, app.getDisplayName());

		if( ! Utils.isEmptyOrWhitespaces( app.getDescription()))
			properties.setProperty( APPLICATION_DESCRIPTION, app.getDescription());

		if( app.getTemplate() != null ) {
			if( ! Utils.isEmptyOrWhitespaces( app.getTemplate().getName()))
				properties.setProperty( APPLICATION_TPL_NAME, app.getTemplate().getName());

			if( ! Utils.isEmptyOrWhitespaces( app.getTemplate().getVersion()))
				properties.setProperty( APPLICATION_TPL_VERSION, app.getTemplate().getVersion());
		}

		Utils.writePropertiesFile( properties, f );
	}