File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/java.base/share/classes/java/io Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ private void flushBuffer() throws IOException {
115
115
116
116
/**
117
117
* Grow buf to fit an additional len bytes if needed.
118
- * A no-op if the buffer is not resizable.
118
+ * If possible, it grows by len+1 to avoid flushing when len bytes
119
+ * are added. A no-op if the buffer is not resizable.
119
120
*/
120
121
private void growIfNeeded (int len ) {
121
122
if (maxBufSize > 0 ) {
Original file line number Diff line number Diff line change @@ -126,7 +126,8 @@ private void ensureOpen() throws IOException {
126
126
127
127
/**
128
128
* Grow char array to fit an additional len characters if needed.
129
- * If possible, it grows by len+1 to reduce the need to flush.
129
+ * If possible, it grows by len+1 to avoid flushing when len chars
130
+ * are added.
130
131
*/
131
132
private void growIfNeeded (int len ) {
132
133
int neededSize = nextChar + len + 1 ;
You can’t perform that action at this time.
0 commit comments