Lines Matching refs:buffer

32  * the ability to buffer the input and to
35 * is created, an internal buffer array is
37 * or skipped, the internal buffer is refilled
56 * The internal buffer array where the data is stored. When necessary,
75 * the buffer.
85 * The current position in the buffer. This is the index of the next
116 * in the buffer array (though they may be
117 * moved to another place in the buffer array,
156 * Check to make sure that buffer has not been nulled out due to
160 byte[] buffer = buf;
161 if (buffer == null)
163 return buffer;
170 * buffer array is created and stored in <code>buf</code>.
180 * with the specified buffer size,
183 * buffer array of length <code>size</code>
187 * @param size the buffer size.
199 * Fills the buffer with more data, taking into account
206 byte[] buffer = getBufIfOpen();
208 pos = 0; /* no mark: throw away the buffer */
209 else if (pos >= buffer.length) /* no room left in buffer */
210 if (markpos > 0) { /* can throw away early part of the buffer */
212 System.arraycopy(buffer, markpos, buffer, 0, sz);
215 } else if (buffer.length >= marklimit) {
216 markpos = -1; /* buffer got too big, invalidate mark */
217 pos = 0; /* drop buffer contents */
218 } else { /* grow buffer */
223 System.arraycopy(buffer, 0, nbuf, 0, pos);
224 if (!bufUpdater.compareAndSet(this, buffer, nbuf)) {
232 buffer = nbuf;
235 int n = getInIfOpen().read(buffer, pos, buffer.length - pos);
268 /* If the requested length is at least as large as the buffer, and
270 bytes into the local buffer. In this way buffered streams will
313 * @param b destination buffer.
364 // If no mark position set then don't keep in buffer
368 // Fill in buffer to save bytes for reset
388 * the buffer (<code>count&nbsp;- pos</code>) and the result of calling the
466 byte[] buffer;
467 while ( (buffer = buf) != null) {
468 if (bufUpdater.compareAndSet(this, buffer, null)) {