*/
private static Map<String, Appearance> parseMaterialStream(Reader reader,
URL baseUrl) throws IOException {
Map<String, Appearance> appearances = new HashMap<String, Appearance>();
Appearance currentAppearance = null;
StreamTokenizer tokenizer = createTokenizer(reader);
while (tokenizer.nextToken() != StreamTokenizer.TT_EOF) {
switch (tokenizer.ttype) {
case StreamTokenizer.TT_WORD :
currentAppearance = parseMaterialLine(tokenizer,
appearances, currentAppearance, baseUrl);
break;
case StreamTokenizer.TT_EOL:
break;
default :
throw new IncorrectFormatException("Unexpected token " + tokenizer.sval
+ " at row " + tokenizer.lineno());
}
}
return appearances;
}