* Entry point. Read our preferences.
*/
public MarketUploader() {
- // check if we've been turned off in the control panel
Preferences prefs = Preferences.userNodeForPackage(getClass());
if (prefs.getBoolean("writeDebugFiles", false)) {
sidePanel.removePropertyChangeListener(changeListener);
}
}
- //findMarketTable();
findMarket.setEnabled(true);
}
}.start();
}
}
}
- // if we don't find the island name, hopefully the server will
}
/**
}
progresslog("pctb commodmap done.");
int[] offerCount = getBuySellMaps(data,buys,sells,stallMap,commodMap);
- //println(buys.toString());
// if (dtxt!=null) dtxt.println(sells);
// if (dtxt!=null) dtxt.println("\n\n\n"+buys);
return;
}
GZIPOutputStream out = new GZIPOutputStream(outStream);
- //FileOutputStream out = new FileOutputStream(new File("output.text"));
DataOutputStream dos = new DataOutputStream(out);
dos.writeBytes("005y\n");
dos.writeBytes(stallMap.size()+"\n");
int first = sb.indexOf("<pre>") + 5;
int last = sb.indexOf("</body>");
xml = sb.substring(first,last);
- //if (dtxt!=null) {
- // dtxt.println(">>");
- // dtxt.println(sb);;
- // dtxt.println("||");
- // dtxt.println(xml);
- // dtxt.println("<<");
- //}
- // if (dtxt!=null) dtxt.println(xml);
Reader reader = new CharArrayReader(xml.toCharArray());
Document d = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(reader));
NodeList maps = d.getElementsByTagName("CommodMap");