*/
response.reset();
pos = 0;
+ size = 0;
stream = null;
writer = null;
}
public void write(int i) throws IOException {
if (pos == bufferSize) {
out().write(buffer);
- pos = 0;
committed = true;
- cacheControl.decorate(request, response);
+ /** Dekoration nur beim ersten Schreib-Schub anstoßen */
+ if (pos == size)
+ cacheControl.decorate(request, response);
+ pos = 0;
}
buffer[pos++] = (byte) i;
size++;
return;
committed = true;
- cacheControl.decorate(request, response);
+ /** Dekoration nur beim ersten Schreib-Schub anstoßen */
+ if (pos == size)
+ cacheControl.decorate(request, response);
out().write(buffer, 0, pos);
out().flush();
pos = 0;