Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #25946
| Date | 2011-02-10 21:52 -0500 |
|---|---|
| From | Arne Vajhøj <arne@vajhoej.dk> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: replace extended characters |
| References | <15bd3363-c781-487b-98d5-2243eff7cc8f@24g2000yqa.googlegroups.com> |
| Message-ID | <4d54a488$0$23759$14726298@news.sunsite.dk> (permalink) |
| Organization | SunSITE.dk - Supporting Open source |
On 10-02-2011 18:33, VIDEO MAN wrote: > I'm trying to create a java utility that will read in a file that may > or may not contain extended ascii characters and replace these > characters with a predetermined character e.g. replace é with e and > then write the amended file out. > > How would people suggest I approach this from an efficiency point of > view given that the input files could be pretty large? > > Any guidance appreciated. Most likely there are not so many choices. You need to decide on IO classes. You should pick either a class with buffer and not buffer yourself or a class without buffer and buffer yourself. If it is single byte charset then you can process either as bytes or chars otherwise you will need to process chars. You can replace either with if/switch or array lookup. I guess that turned out to be 2 x 2 x 2 = 8 possible designs and in reality they are pretty similar. Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
replace extended characters VIDEO MAN <bigmush7@googlemail.com> - 2011-02-10 15:33 -0800
Re: replace extended characters Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-11 18:40 -0500
Re: replace extended characters Arne Vajhøj <arne@vajhoej.dk> - 2011-02-10 21:52 -0500
Re: replace extended characters Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-10 19:37 -0500
Re: replace extended characters Lew <noone@lewscanon.com> - 2011-02-10 19:18 -0500
Re: replace extended characters Roedy Green <see_website@mindprod.com.invalid> - 2011-02-11 16:55 -0800
Re: replace extended characters Owen Jacobson <angrybaldguy@gmail.com> - 2011-02-11 22:15 -0500
Re: replace extended characters Roedy Green <see_website@mindprod.com.invalid> - 2011-02-11 15:07 -0800
Re: replace extended characters Roedy Green <see_website@mindprod.com.invalid> - 2011-02-11 15:11 -0800
csiph-web