Lines Matching refs:buffer
117 // create the initial buffer and read it.
118 byte[] buffer = new byte[avail];
119 int read = stream.read(buffer);
123 return new ByteArrayInputStream(buffer);
129 if (read + avail > buffer.length) {
133 System.arraycopy(buffer, 0, moreBuffer, 0, read);
134 buffer = moreBuffer;
137 read += stream.read(buffer, read, avail);
140 // return a new stream encapsulating this buffer.
141 return new ByteArrayInputStream(buffer);