当前位置: 首页>>代码示例>>Java>>正文


Java SessionInputBuffer.readLine方法代码示例

本文整理汇总了Java中org.apache.http.io.SessionInputBuffer.readLine方法的典型用法代码示例。如果您正苦于以下问题:Java SessionInputBuffer.readLine方法的具体用法?Java SessionInputBuffer.readLine怎么用?Java SessionInputBuffer.readLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.http.io.SessionInputBuffer的用法示例。


在下文中一共展示了SessionInputBuffer.readLine方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseHead

import org.apache.http.io.SessionInputBuffer; //导入方法依赖的package包/类
@Override
protected HttpMessage parseHead(
        final SessionInputBuffer sessionBuffer)
    throws IOException, HttpException, ParseException {

    this.lineBuf.clear();
    int i = sessionBuffer.readLine(this.lineBuf);
    if (i == -1) {
        throw new NoHttpResponseException("The target server failed to respond");
    }
    //create the status line from the status string
    ParserCursor cursor = new ParserCursor(0, this.lineBuf.length());
    StatusLine statusline = lineParser.parseStatusLine(this.lineBuf, cursor);
    return this.responseFactory.newHttpResponse(statusline, null);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:HttpResponseParser.java

示例2: parseHead

import org.apache.http.io.SessionInputBuffer; //导入方法依赖的package包/类
@Override
protected HttpResponse parseHead(
        final SessionInputBuffer sessionBuffer)
    throws IOException, HttpException, ParseException {

    this.lineBuf.clear();
    int i = sessionBuffer.readLine(this.lineBuf);
    if (i == -1) {
        throw new NoHttpResponseException("The target server failed to respond");
    }
    //create the status line from the status string
    ParserCursor cursor = new ParserCursor(0, this.lineBuf.length());
    StatusLine statusline = lineParser.parseStatusLine(this.lineBuf, cursor);
    return this.responseFactory.newHttpResponse(statusline, null);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:DefaultHttpResponseParser.java

示例3: parseHead

import org.apache.http.io.SessionInputBuffer; //导入方法依赖的package包/类
@Override
protected HttpRequest parseHead(
        final SessionInputBuffer sessionBuffer)
    throws IOException, HttpException, ParseException {

    this.lineBuf.clear();
    int i = sessionBuffer.readLine(this.lineBuf);
    if (i == -1) {
        throw new ConnectionClosedException("Client closed connection");
    }
    ParserCursor cursor = new ParserCursor(0, this.lineBuf.length());
    RequestLine requestline = this.lineParser.parseRequestLine(this.lineBuf, cursor);
    return this.requestFactory.newHttpRequest(requestline);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:DefaultHttpRequestParser.java

示例4: parseHead

import org.apache.http.io.SessionInputBuffer; //导入方法依赖的package包/类
@Override
protected HttpMessage parseHead(
        final SessionInputBuffer sessionBuffer)
    throws IOException, HttpException, ParseException {

    this.lineBuf.clear();
    int i = sessionBuffer.readLine(this.lineBuf);
    if (i == -1) {
        throw new ConnectionClosedException("Client closed connection");
    }
    ParserCursor cursor = new ParserCursor(0, this.lineBuf.length());
    RequestLine requestline = this.lineParser.parseRequestLine(this.lineBuf, cursor);
    return this.requestFactory.newHttpRequest(requestline);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:HttpRequestParser.java

示例5: readCRLFSeparatedBlock

import org.apache.http.io.SessionInputBuffer; //导入方法依赖的package包/类
public static String[] readCRLFSeparatedBlock(SessionInputBuffer input) throws IOException {
	CharArrayBuffer line = new CharArrayBuffer(128);
	List<String> ret = new ArrayList<>();
	for (;;) {
		if (input.readLine(line) == -1) break;
		if (line.length() == 0) break;
		ret.add(line.toString());
		line.clear();
	}
	return ret.toArray(new String[ret.size()]);
}
 
开发者ID:LAW-Unimi,项目名称:BUbiNG,代码行数:12,代码来源:InputStreamTestMocks.java

示例6: parseHead

import org.apache.http.io.SessionInputBuffer; //导入方法依赖的package包/类
@Override
protected HttpResponse parseHead(
        final SessionInputBuffer sessionBuffer)
    throws IOException, HttpException, ParseException {

    this.lineBuf.clear();
    final int i = sessionBuffer.readLine(this.lineBuf);
    if (i == -1) {
        throw new NoHttpResponseException("The target server failed to respond");
    }
    //create the status line from the status string
    final ParserCursor cursor = new ParserCursor(0, this.lineBuf.length());
    final StatusLine statusline = lineParser.parseStatusLine(this.lineBuf, cursor);
    return this.responseFactory.newHttpResponse(statusline, null);
}
 
开发者ID:xxonehjh,项目名称:remote-files-sync,代码行数:16,代码来源:DefaultHttpResponseParser.java

示例7: parseHead

import org.apache.http.io.SessionInputBuffer; //导入方法依赖的package包/类
@Override
protected HttpRequest parseHead(
        final SessionInputBuffer sessionBuffer)
    throws IOException, HttpException, ParseException {

    this.lineBuf.clear();
    final int i = sessionBuffer.readLine(this.lineBuf);
    if (i == -1) {
        throw new ConnectionClosedException("Client closed connection");
    }
    final ParserCursor cursor = new ParserCursor(0, this.lineBuf.length());
    final RequestLine requestline = this.lineParser.parseRequestLine(this.lineBuf, cursor);
    return this.requestFactory.newHttpRequest(requestline);
}
 
开发者ID:xxonehjh,项目名称:remote-files-sync,代码行数:15,代码来源:DefaultHttpRequestParser.java


注:本文中的org.apache.http.io.SessionInputBuffer.readLine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。