FileDocCategorySizeDatePackage
FlipProperty.javaAPI DocExample874Wed Jun 25 17:10:44 BST 2003com.develop.ss.ant

FlipProperty

public class FlipProperty extends Object

Fields Summary
Constructors Summary
Methods Summary
private static voidflip(java.lang.String propFile, java.lang.String propName)

    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();
  
public static voidmain(java.lang.String[] args)

    flip(args[0], args[1]);