There is one form of array builder already in the JDK - Stream.builder(). This 
doesn't cover off all of the use-cases, but covers some of them (notably not 
the byte array case).

Thanks for pointing that out!  Under-the-covers it relies on 
java.util.stream.SpinedBuffer, which is built on the same type of segmented 
structure I suggested.  There are some differences and I need to measure some 
of the performance aspects, but it is definitely aimed at the same type of 
problem.
    John

Reply via email to