org.apache.fop.viewer
public class: LoadableProperties [javadoc |
source]
java.lang.Object
java.util.Dictionary
java.util.Hashtable
org.apache.fop.viewer.LoadableProperties
All Implemented Interfaces:
Map, Serializable, Cloneable
Erweitert Hashtable um die Methode load.
Die Zeilen der Textdatei, die mit # oder ! anfangen sind Kommentarzeilen.
Eine g�ltige Zeile ist entweder eine Kommentarzeile oder eine Zeile mit dem
Gleichheitszeichen "in der Mitte".
Die Klasse LoadableProperties l�sst im Gegensatz zu der Klasse Properties die
Schl�sselwerte mit Leerzeichen zu.
- version:
02.12.99 -
- author:
Stanislav.Gorkhover - @jCatalog.com
| Method from org.apache.fop.viewer.LoadableProperties Summary: |
|---|
|
load |
| Methods from java.util.Hashtable: |
|---|
|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keySet, keys, put, putAll, remove, size, toString, values |
| Method from org.apache.fop.viewer.LoadableProperties Detail: |
public void load(InputStream inStream) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(inStream,
"UTF-8"));
String aKey;
String aValue;
int index;
String line = getNextLine(in);
while (line != null) {
line = line.trim();
if (isValid(line)) {
index = line.indexOf("=");
aKey = line.substring(0, index);
aValue = line.substring(index + 1);
put(aKey, aValue);
}
line = getNextLine(in);
}
}
|