Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe11.iad.POSTED!00000000!not-for-mail From: David Lamb User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: java.lang vs java.util References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Lines: 25 Message-ID: NNTP-Posting-Host: 67.193.237.254 X-Complaints-To: abuse@cogeco.net X-Trace: newsfe11.iad 1301957219 67.193.237.254 (Mon, 04 Apr 2011 22:46:59 UTC) NNTP-Posting-Date: Mon, 04 Apr 2011 22:46:59 UTC Date: Mon, 04 Apr 2011 18:46:52 -0400 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2857 On 04/04/2011 7:58 AM, Joshua Cranmer wrote: > On 04/04/2011 12:05 AM, Lawrence D'Oliveiro wrote: >> Which reminds me, I’m still waiting for someone to show how they can >> do this >> >> better >> in Java. > > public void dumpToCSV(Writer out, Connection conn) throws IOException { > Statement stmt = conn.createStatement(); > ResultSet res = stmt.executeQuery(query); > FormattedResulter.printCSV(res, out); > } > > I'm sure somebody essentially wrote the class that does the last line > for me, which, quite frankly, is correct enough given the information > you've provided. If you cry foul, I'd like to point out that you gave > only a very vague description of what goes on in the python code, plus > you've clearly used other libraries in your own code. > Sigh. It would be perfectly fair for Lawrence to ask what the body of printCSV looks like, if that's where the core iteration functionality belongs (I haven't and won't read the python code 'cause I'm a novice in that language).