private static void writeStrings(Writer fw, BibtexDatabase database) throws IOException {
List<BibtexString> strings = new ArrayList<BibtexString>();
for (String s : database.getStringKeySet()) {
strings.add(database.getString(s));
}
Collections.sort(strings, new BibtexStringComparator(false));
// First, make a Map of all entries:
HashMap<String, BibtexString> remaining = new HashMap<String, BibtexString>();
for (Iterator<BibtexString> i=strings.iterator(); i.hasNext();) {
BibtexString string = i.next();
remaining.put(string.getName(), string);