Angsuman's Java Blog

News and views from my perspective as a Chief Software Architect and CEO. Focused on Java and Web Technologies.


Tuesday, August 05, 2003

The code of NAV Download is more concise with:

public static int update() throws Exception {
InputStream is = (new WebConversation()).getResponse(new GetMethodWebRequest(URL)).getTableStartingWith("Filename").getTableCell(1,0).getLinks()[0].click().getInputStream();
drain(is, new BufferedOutputStream(new FileOutputStream(new File(FILE))));
return execSync(INSTALL);
}

However is this desirable?