commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Himsley <m...@mdsh.com>
Subject Re: commons/net whois fails with whois.opensrs.net
Date Tue, 29 Jul 2003 18:04:08 GMT
--On 29 July 2003 11:21 -0400 "Daniel F. Savarese" <dfs@savarese.org> wrote:

> I want to apply your patch, but I can't for two
> reasons.  The first is that PrintStream converts strings to bytes
> using the platform's default character encoding.

Ah. Thanks. I've been searching through O'Reilly's Java in a Nutshell to 
work out the difference between the Print* and DataOutput* methods but 
didn't spot that (now so obvious) difference. I must keep i18n to the 
forefront of my mind.

> but then there's the problem that PrintStream methods don't throw
> IOException and hide the real cause of an error

Yes, I see (now).

> output = new DataOutputStream(new BufferedOutputStream(_output_,
> someSize));

I've implemented this with someSize=1024 (just a random number) in my 
sandbox of CVS jakarta-commons/net tag NET_1_0_0 and it cured my problem 
talking to the whois server at whois.opensrs.net.

Thanks *very* much for your input.


> daniel


-- 
Mark Himsley

Mime
View raw message