Andreas L Delmelle a écrit : > On Jan 15, 2007, at 22:20, Andreas L Delmelle wrote: > >> <snip /> > >> Not really sure what would be most efficient: >> - a void method appending to a parameter StringBuffer >> - a method returning a copy of the char[] from index to index... >> >> Seen that every String ultimately has a backing char[](*) anyway, I'd >> say that we can safely return the copy, and remove the overhead of >> >> StringBuffer.append(new String(char[])).toString().toCharArray() > > Looked a bit deeper, and there is apparently a good reason to use a > StringBuffer: the char[] from one FOText might need to be appended to > that of a previous one (see TextLM.findHyphenationPoints()). > > I guess it would be a bad idea to replace this with arrays, since > they're not so straightforward to concatenate (requires copying into a > new array). > > Too bad we're still targeting 1.3, else we might consider switching to a > java.nio.CharBuffer...
Hadn't we agreed upon raising the minimum Java version to 1.4? Or at least make a poll on fop-user to see if that would create any problem. If that'd depend only on me, we would already be using all the Java 1.5 nice features ;-) Vincent
