本文整理匯總了Java中org.apache.http.util.CharArrayBuffer.buffer方法的典型用法代碼示例。如果您正苦於以下問題:Java CharArrayBuffer.buffer方法的具體用法?Java CharArrayBuffer.buffer怎麽用?Java CharArrayBuffer.buffer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.http.util.CharArrayBuffer
的用法示例。
在下文中一共展示了CharArrayBuffer.buffer方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: readLine
import org.apache.http.util.CharArrayBuffer; //導入方法依賴的package包/類
public int readLine(final CharArrayBuffer buffer) throws IOException {
int l = this.in.readLine(buffer);
if (this.wire.enabled() && l >= 0) {
int pos = buffer.length() - l;
String s = new String(buffer.buffer(), pos, l);
String tmp = s + "\r\n";
this.wire.input(tmp.getBytes(this.charset));
}
return l;
}
示例2: writeLine
import org.apache.http.util.CharArrayBuffer; //導入方法依賴的package包/類
public void writeLine(final CharArrayBuffer buffer) throws IOException {
this.out.writeLine(buffer);
if (this.wire.enabled()) {
String s = new String(buffer.buffer(), 0, buffer.length());
String tmp = s + "\r\n";
this.wire.output(tmp.getBytes(this.charset));
}
}
示例3: readLine
import org.apache.http.util.CharArrayBuffer; //導入方法依賴的package包/類
@Override
public int readLine(final CharArrayBuffer buffer) throws IOException {
final int l = this.in.readLine(buffer);
if (this.wire.enabled() && l >= 0) {
final int pos = buffer.length() - l;
final String s = new String(buffer.buffer(), pos, l);
final String tmp = s + "\r\n";
this.wire.input(tmp.getBytes(this.charset));
}
return l;
}
示例4: writeLine
import org.apache.http.util.CharArrayBuffer; //導入方法依賴的package包/類
@Override
public void writeLine(final CharArrayBuffer buffer) throws IOException {
this.out.writeLine(buffer);
if (this.wire.enabled()) {
final String s = new String(buffer.buffer(), 0, buffer.length());
final String tmp = s + "\r\n";
this.wire.output(tmp.getBytes(this.charset));
}
}