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 would be a marginal gain, compared to breaking backwards compatibility.
On Wednesday, September 14, 2011, Martin Grigorov <mgrigo...@apache.org> wrote: > 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 abstract as all other methods in this class. > > I like the approach. > > On Wed, Sep 14, 2011 at 1:11 PM, Andrea Del Bene <adelb...@ciseonweb.it> wrote: >> 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 Wicket.next because it is API break ? >>> In the patch I added this new method for all implementations of >>> o.a.w.request.Response which we deliver but since there could be users >>> providing their own impls it is not OK to add it in 1.5.x? >>> >>> Please confirm. >>> >> >> > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com >