harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Gray <chris.g...@kiffer.be>
Subject Re: [general] Reduced footprint class library
Date Mon, 29 Sep 2008 20:11:57 GMT
On Monday 29 September 2008 17:46, Tim Ellison wrote:
> Chris Gray wrote:
> >> You can now go into the NIO_CHAR/make/excludesfile and specify
> >> converters to drop from the Harmony provider.  That allows you to ditch
> >> some esoteric charsets and save footprint, and in many cases the ICU
> >> provider has an equivalent anyway.
> >
> > But isn't the ICU provider itself rather large?
> Yes.  We can move on to look at reducing that too, but first order was
> to reduce the duplication we are responsible for.

On closer inspection it appears that there are both Java-only and native 
versions of quite a range of popular charsets, without having to import ICU - 
so I'm pretty happy from that point of view. It also looks to be fairly easy 
to code up a new one (e.g. for JIS) ad-hoc if needed.

> The natives are there to support heuristic optimization of
> encoding/decoding direct buffers.  While it makes sense on a machine
> with lots of resources (e.g. a server) it doesn't for constrained
> devices which is why they are now optional.

See above.

> > I suppose the Sun-defined provider mechanism only works for 100%-Java
> > charsets?
> Not sure I understand the question.

Sorry, unclear expression of my muddled thinking. Of course the classes loaded 
in by the framework can also load native libraries, so long as the class 
loader in question knows how to find them. I was thinking the libraries would 
have to be on the standard library path, but it ain't so.

> You can write a provider with non-Java code too (like the native code we
> have got), but you then hook into the provider mechanism through the
> Java APIs.
> Of course, you can also have 'built-in' providers that are not added via
> the regular framework APIs, which we use for example in bootstrapping
> the class libraries.

Yes of course.



Chris Gray        /k/ Embedded Java Solutions      BE0503765045
Embedded & Mobile Java, OSGi    http://www.k-embedded-java.com/
chris.gray@kiffer.be                             +32 3 216 0369
Skype: k.embedded.chris

View raw message