cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Pötz <>
Subject Re: BufferedOutputStream
Date Mon, 02 Jun 2008 12:38:26 GMT
Joerg Heinicke wrote:
> On 02.06.2008 05:56, Sylvain Wallez wrote:
>>>> Only issue I want to solve before the release is the 
>>>> BufferedOutputStream issue. I planned to do it this weekend.
>>> Done. Please review the file attached. It's still completely 
>>> untested. At the moment I need some sleep ;) I will write junit tests 
>>> for it this week and eventually commit it.
>> Stupid question: why do we need a special BufferedOutputStream?
> For being able to reset the response buffer for error handling. This is 
> also possible with, if the buffer size is 
> big enough (current default value is 1MB), but then the buffer byte[] is 
> always that big rather than increasing. That's what's happening right 
> now, if you don't specify -1 as buffer size. -1 means complete buffering 
> which on the other hand might lead to OutOfMemoryError [1]. In addition 
> our BOS counts the bytes so that we can use the value to set the content 
> length header.

Is my understanding right that the content length header can only be set 
as long as you haven't written into the underlying output stream?

Reinhard Pötz                           Managing Director, {Indoqa} GmbH

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member        

View raw message