Yes, I'm afraid we should wait for a major release to add it.
Hi,
I just filed https://issues.apache.org/jira/browse/WICKET-4052: Add
org.apache.wicket.request.Response.write(byte[], int, int) to make it
easier to write buffered data to the web response.
I guess this have to wait for
Emond suggested in IRC to add default impl in Response like:
public void write(byte[] array, int offset, int length) {
byte[] towrite = new byte[length];
System.arraycopy(array, offset, towrite, 0, length);
write(towrite);
}
so it will work for 1.5.1.
For Wicket.next we can make it
write(byte[],int,int) has a concrete implementation even in OutputStream. I
don't think it would be necessary to make it abstract, even in Wicket.next.
Well, the ideal would be to make this method abstract, and write(byte[])
concrete, since it would avoid the arraycopy overhead, but I think it
I already committed the change.
At runtime ServletWebRequest is used and it delegates to
ServletOutputStream#write(byte[], int, int), so arraycopy() is not
used at all.
o.a.w.request.Response is an abstract class that hides the specifics
for the user (i.e. the user just uses