本文整理汇总了Java中org.apache.http.message.LineParser类的典型用法代码示例。如果您正苦于以下问题:Java LineParser类的具体用法?Java LineParser怎么用?Java LineParser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LineParser类属于org.apache.http.message包,在下文中一共展示了LineParser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AbstractMessageParser
import org.apache.http.message.LineParser; //导入依赖的package包/类
/**
* Creates an instance of this class.
*
* @param buffer the session input buffer.
* @param parser the line parser.
* @param params HTTP parameters.
*/
public AbstractMessageParser(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpParams params) {
super();
if (buffer == null) {
throw new IllegalArgumentException("Session input buffer may not be null");
}
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
this.sessionBuffer = buffer;
this.maxHeaderCount = params.getIntParameter(
CoreConnectionPNames.MAX_HEADER_COUNT, -1);
this.maxLineLen = params.getIntParameter(
CoreConnectionPNames.MAX_LINE_LENGTH, -1);
this.lineParser = (parser != null) ? parser : BasicLineParser.DEFAULT;
this.headerLines = new ArrayList<CharArrayBuffer>();
this.state = HEAD_LINE;
}
示例2: DefaultResponseParser
import org.apache.http.message.LineParser; //导入依赖的package包/类
public DefaultResponseParser(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpResponseFactory responseFactory,
final HttpParams params) {
super(buffer, parser, params);
if (responseFactory == null) {
throw new IllegalArgumentException
("Response factory may not be null");
}
this.responseFactory = responseFactory;
this.lineBuf = new CharArrayBuffer(128);
this.maxGarbageLines = getMaxGarbageLines(params);
}
示例3: DefaultHttpResponseParser
import org.apache.http.message.LineParser; //导入依赖的package包/类
public DefaultHttpResponseParser(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpResponseFactory responseFactory,
final HttpParams params) {
super(buffer, parser, params);
if (responseFactory == null) {
throw new IllegalArgumentException
("Response factory may not be null");
}
this.responseFactory = responseFactory;
this.lineBuf = new CharArrayBuffer(128);
}
示例4: HttpResponseParser
import org.apache.http.message.LineParser; //导入依赖的package包/类
/**
* Creates an instance of this class.
*
* @param buffer the session input buffer.
* @param parser the line parser.
* @param responseFactory the factory to use to create
* {@link HttpResponse}s.
* @param params HTTP parameters.
*/
public HttpResponseParser(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpResponseFactory responseFactory,
final HttpParams params) {
super(buffer, parser, params);
if (responseFactory == null) {
throw new IllegalArgumentException("Response factory may not be null");
}
this.responseFactory = responseFactory;
this.lineBuf = new CharArrayBuffer(128);
}
示例5: DefaultHttpResponseParser
import org.apache.http.message.LineParser; //导入依赖的package包/类
/**
* Creates an instance of this class.
*
* @param buffer the session input buffer.
* @param parser the line parser.
* @param responseFactory the factory to use to create
* {@link HttpResponse}s.
* @param params HTTP parameters.
*/
public DefaultHttpResponseParser(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpResponseFactory responseFactory,
final HttpParams params) {
super(buffer, parser, params);
if (responseFactory == null) {
throw new IllegalArgumentException("Response factory may not be null");
}
this.responseFactory = responseFactory;
this.lineBuf = new CharArrayBuffer(128);
}
示例6: DefaultHttpRequestParser
import org.apache.http.message.LineParser; //导入依赖的package包/类
/**
* Creates an instance of this class.
*
* @param buffer the session input buffer.
* @param parser the line parser.
* @param requestFactory the factory to use to create
* {@link HttpRequest}s.
* @param params HTTP parameters.
*/
public DefaultHttpRequestParser(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpRequestFactory requestFactory,
final HttpParams params) {
super(buffer, parser, params);
if (requestFactory == null) {
throw new IllegalArgumentException("Request factory may not be null");
}
this.requestFactory = requestFactory;
this.lineBuf = new CharArrayBuffer(128);
}
示例7: HttpRequestParser
import org.apache.http.message.LineParser; //导入依赖的package包/类
/**
* Creates an instance of this class.
*
* @param buffer the session input buffer.
* @param parser the line parser.
* @param requestFactory the factory to use to create
* {@link HttpRequest}s.
* @param params HTTP parameters.
*/
public HttpRequestParser(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpRequestFactory requestFactory,
final HttpParams params) {
super(buffer, parser, params);
if (requestFactory == null) {
throw new IllegalArgumentException("Request factory may not be null");
}
this.requestFactory = requestFactory;
this.lineBuf = new CharArrayBuffer(128);
}
示例8: DefaultHttpResponseParserFactory
import org.apache.http.message.LineParser; //导入依赖的package包/类
public DefaultHttpResponseParserFactory(
final LineParser lineParser,
final HttpResponseFactory responseFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.responseFactory = responseFactory != null ? responseFactory
: DefaultHttpResponseFactoryHC4.INSTANCE;
}
示例9: DefaultHttpResponseParser
import org.apache.http.message.LineParser; //导入依赖的package包/类
/**
* @deprecated (4.3) use {@link DefaultHttpResponseParser#DefaultHttpResponseParser(
* SessionInputBuffer, LineParser, HttpResponseFactory, MessageConstraints)}
*/
@Deprecated
public DefaultHttpResponseParser(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpResponseFactory responseFactory,
final HttpParams params) {
super(buffer, parser, params);
Args.notNull(responseFactory, "Response factory");
this.responseFactory = responseFactory;
this.lineBuf = new CharArrayBuffer(128);
}
示例10: DefaultHttpResponseParserFactory
import org.apache.http.message.LineParser; //导入依赖的package包/类
public DefaultHttpResponseParserFactory(final LineParser lineParser,
final HttpResponseFactory responseFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.responseFactory = responseFactory != null ? responseFactory
: DefaultHttpResponseFactoryHC4.INSTANCE;
}
示例11: DefaultHttpRequestParserFactory
import org.apache.http.message.LineParser; //导入依赖的package包/类
public DefaultHttpRequestParserFactory(final LineParser lineParser,
final HttpRequestFactory requestFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.requestFactory = requestFactory != null ? requestFactory
: DefaultHttpRequestFactoryHC4.INSTANCE;
}
示例12: AbstractMessageParserHC4
import org.apache.http.message.LineParser; //导入依赖的package包/类
/**
* Creates an instance of AbstractMessageParserHC4.
*
* @param buffer the session input buffer.
* @param parser the line parser.
* @param params HTTP parameters.
*
* @deprecated (4.3) use {@link AbstractMessageParserHC4#AbstractMessageParserHC4(SessionInputBuffer,
* LineParser, MessageConstraints)}
*/
@Deprecated
public AbstractMessageParserHC4(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpParams params) {
super();
Args.notNull(buffer, "Session input buffer");
Args.notNull(params, "HTTP parameters");
this.sessionBuffer = buffer;
this.messageConstraints = HttpParamConfig.getMessageConstraints(params);
this.lineParser = (parser != null) ? parser : BasicLineParserHC4.INSTANCE;
this.headerLines = new ArrayList<CharArrayBuffer>();
this.state = HEAD_LINE;
}
示例13: DefaultResponseParser
import org.apache.http.message.LineParser; //导入依赖的package包/类
public DefaultResponseParser(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpResponseFactory responseFactory,
final HttpParams params) {
super(buffer, parser, params);
Args.notNull(responseFactory, "Response factory");
this.responseFactory = responseFactory;
this.lineBuf = new CharArrayBuffer(128);
this.maxGarbageLines = getMaxGarbageLines(params);
}
示例14: DefaultHttpResponseParserFactory
import org.apache.http.message.LineParser; //导入依赖的package包/类
public DefaultHttpResponseParserFactory(
final LineParser lineParser,
final HttpResponseFactory responseFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParser.INSTANCE;
this.responseFactory = responseFactory != null ? responseFactory
: DefaultHttpResponseFactory.INSTANCE;
}
示例15: DefaultResponseParser
import org.apache.http.message.LineParser; //导入依赖的package包/类
public DefaultResponseParser(
final SessionInputBuffer buffer,
final LineParser parser,
final HttpResponseFactory responseFactory,
final HttpParams params) {
super(buffer, parser, params);
if (responseFactory == null) {
throw new IllegalArgumentException
("Response factory may not be null");
}
this.responseFactory = responseFactory;
this.lineBuf = new CharArrayBuffer(128);
this.maxGarbageLines = params.getIntParameter(
ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, Integer.MAX_VALUE);
}