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
66 * The internal buffer array where the data is stored. When necessary,
85 * the buffer.
95 * The current position in the buffer. This is the index of the next
126 * in the buffer array (though they may be
127 * moved to another place in the buffer array,
166 * Check to make sure that buffer has not been nulled out due to
170 byte[] buffer = buf;
171 if (buffer == null)
173 return buffer;
180 * buffer array is created and stored in <code>buf</code>.
190 * with the specified buffer size,
193 * buffer array of length <code>size</code>
197 * @param size the buffer size.
209 * Fills the buffer with more data, taking into account
216 byte[] buffer = getBufIfOpen();
218 pos = 0; /* no mark: throw away the buffer */
219 else if (pos >= buffer.length) /* no room left in buffer */
220 if (markpos > 0) { /* can throw away early part of the buffer */
222 System.arraycopy(buffer, markpos, buffer, 0, sz);
225 } else if (buffer.length >= marklimit) {
226 markpos = -1; /* buffer got too big, invalidate mark */
227 pos = 0; /* drop buffer contents */
228 } else if (buffer.length >= MAX_BUFFER_SIZE) {
230 } else { /* grow buffer */
236 System.arraycopy(buffer, 0, nbuf, 0, pos);
237 if (!bufUpdater.compareAndSet(this, buffer, nbuf)) {
245 buffer = nbuf;
248 int n = getInIfOpen().read(buffer, pos, buffer.length - pos);
281 /* If the requested length is at least as large as the buffer, and
283 bytes into the local buffer. In this way buffered streams will
326 * @param b destination buffer.
377 // If no mark position set then don't keep in buffer
381 // Fill in buffer to save bytes for reset
401 * the buffer (<code>count&nbsp;- pos</code>) and the result of calling the
479 byte[] buffer;
480 while ( (buffer = buf) != null) {
481 if (bufUpdater.compareAndSet(this, buffer, null)) {