Home | History | Annotate | Download | only in io

Lines Matching defs:this

9  * distributed with this work for additional information
10 * regarding copyright ownership. The ASF licenses this file
12 * "License"); you may not use this file except in compliance
25 * This software consists of voluntary contributions made by many
76 this.outstream = outstream;
77 this.buffer = new ByteArrayBuffer(buffersize);
78 this.charset = HttpProtocolParams.getHttpElementCharset(params);
79 this.ascii = this.charset.equalsIgnoreCase(HTTP.US_ASCII)
80 || this.charset.equalsIgnoreCase(HTTP.ASCII);
81 this.metrics = new HttpTransportMetricsImpl();
85 int len = this.buffer.length();
87 this.outstream.write(this.buffer.buffer(), 0, len);
88 this.buffer.clear();
89 this.metrics.incrementBytesTransferred(len);
95 this.outstream.flush();
105 if (len > MAX_CHUNK || len > this.buffer.capacity()) {
109 this.outstream.write(b, off, len);
110 this.metrics.incrementBytesTransferred(len);
113 int freecapacity = this.buffer.capacity() - this.buffer.length();
119 this.buffer.append(b, off, len);
131 if (this.buffer.isFull()) {
134 this.buffer.append(b);
142 write(s.getBytes(this.charset));
151 if (this.ascii) {
155 int chunk = this.buffer.capacity() - this.buffer.length();
158 this.buffer.append(s, off, chunk);
160 if (this.buffer.isFull()) {
167 // This is VERY memory inefficient, BUT since non-ASCII charsets are
169 byte[] tmp = s.toString().getBytes(this.charset);
176 return this.metrics;