🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #776

Re: Byte-Char Conversion

#776
From: Owen Green
Date: Wed, 16 Oct 2002 13:52
30 lines
2260 bytes
"John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message
news:MPG.1816ea6e9f26b40e98ba95@newsgroups.borland.com...
> On Sun, 13 Oct 2002 17:51:10 +0100, Owen Green wrote:
>
> > Any (easy) home grown solutions look like they'd suffer from
> > the same frailties as all the old deprecated JDK1.x conversion
> > methods, as they'd rely on assumptions about the character
> > encoding.
>
> The java.nio package in Java 1.4 has new classes for dealing with
> encoding.  I have not tried them, but this may be what you need.

Should have mentioned that given that it's going towards a public
framework I was trying to keep it to within 1.3 compatibilty - limiting
it to 1.4 would probably reduce take-up.

I really can't see /why/ InputStreamReader has to over read though - I
understand that's for efficiency, but it would be nice to be given the
option.*

The Jetty servlet engine seems to have something that deals with this,
so I'm looking at their code to see if it provides any insight.

Thanks for the suggesstion,
Owen

*Unless I misunderstand it's behaviour. But, AFAICS, it will just read
in it's default buffer (8k) every time it fills, which knackers you if
you have arbitary textual and binrary content in the same stream.
Technical Details
Message-ID: <3dad6efd$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3da9a473$1@newsgroups.borland.com> <MPG.1816ea6e9f26b40e98ba95@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,c3655063af01f787
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-10-16 07:12:05 PST
From: "Owen Green" <owen@begonefoulmachine.kennulz.demon.co.uk>
Newsgroups: borland.public.jbuilder.java.api
References: <3da9a473$1@newsgroups.borland.com> <MPG.1816ea6e9f26b40e98ba95@newsgroups.borland.com>
Subject: Re: Byte-Char Conversion
Date: Wed, 16 Oct 2002 14:52:05 +0100
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 62.253.133.165
Message-ID: <3dad6efd$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1034776317 62.253.133.165 (16 Oct 2002 06:51:57 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail