the following code, response.isCommitted () is judged to be true , but as far as I understand it, and the experiment on the default 8192 buffersize (see the last two sections of code), this happens only for the output words that are supposed to exceed 16384 . Now the word 10000 is like this, and I"ve tried it. It seems to exceed 8192 , just like response.setBufferSize (16384).
response.setBufferSize(16384);
System.out.println("buffer size: " + response.getBufferSize()); // 16384
for (int i = 0; i < 10000; iPP) {
str += "";
}
if (response.isCommitted()) { //
System.out.println("response has committed");
}
default bufferSize experiment:
System.out.println("buffer size: " + response.getBufferSize()); // 8192
for (int i = 0; i < 8191; iPP) {
str += "";
}
if (response.isCommitted()) { // <8192
System.out.println("response has committed");
}
System.out.println("buffer size: " + response.getBufferSize()); // 8192
for (int i = 0; i < 8192; iPP) {
str += "";
}
if (response.isCommitted()) { // >=8192
System.out.println("response has committed");
