This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Character set converters...


David Daney wrote:

Since then, Bryce has said that he thinks the nio API is too
heavyweight.  So, things are a bit undecided.

Other that that I see no reason why gnu.java.nio.charset.* could not be
made as efficient as gnu.gcj.convert.*



How would you get data into the converter without either an extra layer of copying, or creating a new CharBuffer instance each time (via the wrap() method)? Seems to me you'd have to do one of these things for every write() call.


That additional overhead might be acceptable if either using the converters was simplified significantly, or it meant that a wider range of high quality converters became available to us, but I don't think either of those are the case. Implementing a new charset in the java.nio.charset API is, I think, be significantly more complicated than it would in the simpler gcj/classpath APIs.

This is just an argument against converting things like PrintStream to use java.nio.charset directly. I certainly don't see a problem with creating a gnu.gcj.convert wrapper for java.nio.charset in order to handle additional encodings that we don't currently have in the gnu.gcj.convert form.

Regards

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]