Added methods to get and set properties, and stub method to save them

This commit is contained in:
Eric Scharff 2007-09-26 09:48:21 -06:00
parent cacb5a6f1e
commit 8c248e382f

View File

@ -1,6 +1,7 @@
package java.util;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
public class Properties extends Hashtable {
@ -8,6 +9,18 @@ public class Properties extends Hashtable {
new Parser().parse(in, this);
}
public void store(OutputStream out, String comment) throws IOException {
// TODO
}
public String getProperty(String key) {
return (String)get(key);
}
public void setProperty(String key, String value) {
put(key, value);
}
private static class Parser {
private StringBuilder key = null;
private StringBuilder value = null;