public class LiveJournalEntryParser extends BufferedReader {
...
public LiveJournalEntry parse() throws IOException {
...
String location = null;
m = line.indexOf("<strong>Current Mood:</strong> ");
if (m >= 0) {
mood = removeTags( line.substring(m+31) );
line = line.substring(0,m);
}
m = line.indexOf("<strong>Current Location:</strong> ");
if (m >= 0) {
location = removeTags( line.substring(m+35) );
line = line.substring(0,m);
}
m = line.indexOf("<strong>Tags:</strong> ");
...
}
...
} |