Lines Matching refs:size
42 size_t Stream::peek(void* buffer, size_t size) { in peek() argument
44 if (size > peek_remaining) { in peek()
46 mPeekBuffer = new char[size]; in peek()
51 size_t read = doRead(mPeekBuffer + mPeekOffset, size - peek_remaining); in peek()
55 size = min(size, mPeekSize - mPeekOffset); in peek()
56 memcpy(buffer, mPeekBuffer + mPeekOffset, size); in peek()
57 return size; in peek()
60 size_t Stream::read(void* buffer, size_t size) { in read() argument
64 bytes_read = min(size, peek_remaining); in read()
73 size -= bytes_read; in read()
76 if (size) { in read()
77 bytes_read += doRead(buffer, size); in read()
110 size_t MemoryStream::doRead(void* buffer, size_t size) { in doRead() argument
111 size = min(size, mRemaining); in doRead()
112 memcpy(buffer, mBuffer, size); in doRead()
113 mBuffer += size; in doRead()
114 mRemaining -= size; in doRead()
115 return size; in doRead()
118 size_t FileStream::doRead(void* buffer, size_t size) { in doRead() argument
119 return fread(buffer, 1, size, mFd); in doRead()
122 size_t JavaInputStream::doRead(void* dstBuffer, size_t size) { in doRead() argument
126 size_t requested = min(size, mByteArrayLength); in doRead()
137 size -= bytesRead; in doRead()
138 } while (size > 0); in doRead()