// for now, no caching... static String[] loadSnippetAndTitle(String id) throws IOException { long snippetID = parseSnippetID(id); String json; try { URL url = new URL(tb_mainServer() + "/tb-int/get.php?id=" + snippetID + "&full=1"); json = loadPage(url); } catch (RuntimeException e) { // TODO: test for nested IOException throw new IOException("Snippet #" + snippetID + " not found or not public"); } Map map = jsonDecodeMap(json); return new String[] {map.get("text"), map.get("title")}; }