View | Details | Raw Unified | Return to bug 52328
Collapse All | Expand All

(-)a/java/org/apache/catalina/connector/OutputBuffer.java (-8 / +9 lines)
Lines 303-308 public class OutputBuffer extends Writer Link Here
303
            return;
303
            return;
304
        }
304
        }
305
305
306
        // Flush the convertor if one is in use
307
        if (gotEnc && conv != null) {
308
            conv.flushBuffer();
309
        }
310
306
        try {
311
        try {
307
            doFlush = true;
312
            doFlush = true;
308
            if (initial) {
313
            if (initial) {
Lines 426-432 public class OutputBuffer extends Writer Link Here
426
        }
431
        }
427
432
428
        conv.convert((char) c);
433
        conv.convert((char) c);
429
        conv.flushBuffer();
430
        charsWritten++;
434
        charsWritten++;
431
435
432
    }
436
    }
Lines 454-460 public class OutputBuffer extends Writer Link Here
454
        }
458
        }
455
459
456
        conv.convert(c, off, len);
460
        conv.convert(c, off, len);
457
        conv.flushBuffer();
458
        charsWritten += len;
461
        charsWritten += len;
459
462
460
    }
463
    }
Lines 476-483 public class OutputBuffer extends Writer Link Here
476
            s = "null";
479
            s = "null";
477
        }
480
        }
478
        conv.convert(s, off, len);
481
        conv.convert(s, off, len);
479
        conv.flushBuffer();
480
481
    }
482
    }
482
483
483
484
Lines 493-500 public class OutputBuffer extends Writer Link Here
493
            s = "null";
494
            s = "null";
494
        }
495
        }
495
        conv.convert(s);
496
        conv.convert(s);
496
        conv.flushBuffer();
497
498
    }
497
    }
499
498
500
499
Lines 579-592 public class OutputBuffer extends Writer Link Here
579
578
580
579
581
    public void reset() {
580
    public void reset() {
582
581
        // If a Writer was being used, there may be bytes in the converter
582
        if (gotEnc && conv != null) {
583
            conv.recycle();
584
        }
583
        bb.recycle();
585
        bb.recycle();
584
        bytesWritten = 0;
586
        bytesWritten = 0;
585
        charsWritten = 0;
587
        charsWritten = 0;
586
        gotEnc = false;
588
        gotEnc = false;
587
        enc = null;
589
        enc = null;
588
        initial = true;
590
        initial = true;
589
590
    }
591
    }
591
592
592
593

Return to bug 52328