Properties props = new Properties();
FileInputStream inStream = new FileInputStream(propFile);
props.load(inStream);
inStream.close();
String value = props.getProperty(propName);
int newValue = 1 - Integer.parseInt(value);
props.setProperty(propName, Integer.toString(newValue));
FileOutputStream out = new FileOutputStream(propFile);
props.store(out, "Auto saved by " + FlipProperty.class);
out.close();