Home | History | Annotate | Download | only in toolbox

Lines Matching refs:buf

93             byte[] buf = mBuffersBySize.get(i);
94 if (buf.length >= len) {
95 mCurrentSize -= buf.length;
97 mBuffersByLastUse.remove(buf);
98 return buf;
108 * @param buf the buffer to return to the pool.
110 public synchronized void returnBuf(byte[] buf) {
111 if (buf == null || buf.length > mSizeLimit) {
114 mBuffersByLastUse.add(buf);
115 int pos = Collections.binarySearch(mBuffersBySize, buf, BUF_COMPARATOR);
119 mBuffersBySize.add(pos, buf);
120 mCurrentSize += buf.length;
129 byte[] buf = mBuffersByLastUse.remove(0);
130 mBuffersBySize.remove(buf);
131 mCurrentSize -= buf.length;