From: <yos...@us...> - 2010-01-27 18:44:14
|
Right. That's one option. We could wrap IOException by ICU's own exception extending RunTimeException. If we want to take this approach, we should document this as well (not in the method signature). -Yoshito Mark Davis ☕ <ma...@ma...> wrote on 01/27/2010 01:29:30 PM: > We don't have to propagate it as an IO exception. What I do in other > cases is to catch any exception, and throw an ICU exception with the > original as a cause. > > (The Java non-runtime exceptions are just a pain -- I see no value > to them since you can always get runtime exceptions anyway.) > > Mark > > On Wed, Jan 27, 2010 at 10:31, <yos...@us...> wrote: > I'm wondering how we want to handle IOException in this case. > Once we extend the API to support Appendable, such method should propagate > IOException which might be thrown by Appendable implementation classes, > such as OutputStreamWriter, CharBuffer etc.. So I think the method should > "throws IOException" in its method signature. > > -Yoshito > > Markus Scherer <mar...@gm...> wrote on 01/27/2010 01:04:30 PM: > > > Dear ICU team & users, > > > > I would like to propose a new overload of the new (@draft ICU 4.4) > > Normalizer2.normalize() methods, one that writes to an Appendable > > rather than a StringBuilder. I think I managed to support that > > reasonably, although it is slightly slower than writing to a > StringBuilder. > > > > Given that we are past the API Freeze milestone, I expect that this > > will be an ICU 4.6 API addition. If you think this is appropriate > > and useful to have in ICU 4.4 (as draft API of course), then please > > speak up and the ICU team may discuss it. > > > > I currently have it checked in as @internal. > > (And note that I am only half done porting the new normalization > > code to Java.) > > > > /** > > * Writes the normalized form of the source string to the > > destination Appendable > > * and returns the destination Appendable. > > * The source and destination strings must be different objects. > > * @param src source string > > * @param dest destination Appendable; gets normalized src appended > > * @return dest > > * @internal ICU 4.4 TODO: propose for 4.6 > > * @provisional This API might change or be removed in a future > release. > > */ > > public abstract Appendable normalize(CharSequence src, Appendable > dest); > > > > Best regards, > > markus > > > ------------------------------------------------------------------------------ > > The Planet: dedicated and managed hosting, cloud storage, colocation > > Stay online with enterprise data centers and the best network in the > business > > Choose flexible plans and management services without long-term > contracts > > Personal 24x7 support from experience hosting pros just a phone call > away. > > http://p.sf.net/sfu/theplanet-com > > _______________________________________________ > > icu-design mailing list > > icu...@li... > > To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-design > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > icu-design mailing list > icu...@li... > To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-design > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > icu-design mailing list > icu...@li... > To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-design |