Lines Matching refs:buf

84     nxt_unit_buf_t           *buf;  in nxt_java_OutputStream_writeByte()  local
91 buf = nxt_java_OutputStream_req_buf(env, req); in nxt_java_OutputStream_writeByte()
92 if (buf == NULL) { in nxt_java_OutputStream_writeByte()
96 *buf->free++ = b; in nxt_java_OutputStream_writeByte()
98 if ((uint32_t) (buf->free - buf->start) >= data->buf_size) { in nxt_java_OutputStream_writeByte()
130 if (data->buf != NULL) { in nxt_java_OutputStream_flush_buf()
131 rc = nxt_unit_buf_send(data->buf); in nxt_java_OutputStream_flush_buf()
136 data->buf = NULL; in nxt_java_OutputStream_flush_buf()
151 nxt_unit_buf_t *buf; in nxt_java_OutputStream_req_buf() local
155 buf = data->buf; in nxt_java_OutputStream_req_buf()
157 if (buf == NULL || buf->free >= buf->end) { in nxt_java_OutputStream_req_buf()
160 buf = nxt_unit_response_buf_alloc(req, size); in nxt_java_OutputStream_req_buf()
161 if (buf == NULL) { in nxt_java_OutputStream_req_buf()
167 data->buf = buf; in nxt_java_OutputStream_req_buf()
170 return buf; in nxt_java_OutputStream_req_buf()
181 nxt_unit_buf_t *buf; in nxt_java_OutputStream_write() local
191 buf = nxt_java_OutputStream_req_buf(env, req); in nxt_java_OutputStream_write()
192 if (buf == NULL) { in nxt_java_OutputStream_write()
196 copy = buf->end - buf->free; in nxt_java_OutputStream_write()
199 memcpy(buf->free, ptr + off, copy); in nxt_java_OutputStream_write()
200 buf->free += copy; in nxt_java_OutputStream_write()
205 if ((uint32_t) (buf->free - buf->start) >= data->buf_size) { in nxt_java_OutputStream_write()
226 if (data->buf != NULL && data->buf->free > data->buf->start) { in nxt_java_OutputStream_flush()