creating internalized String directly from byte[] array?
807589Nov 28 2008 — edited Dec 3 2008Currently I create many internalized Strings from a byte array using
new String(byte[], from, length).intern();
This takes many 100 nanoseconds per String since
a string object is created each time involving 8bit to 16bit character conversion.
Does Java provide a more efficient method avoiding String object creation if possible?
Otherwise I would need to maintain my own String pool.