public DefaultHttpResponseParserFactory(
final LineParser lineParser,
final HttpResponseFactory responseFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.responseFactory = responseFactory != null ? responseFactory
: DefaultHttpResponseFactoryHC4.INSTANCE;
}
java类org.apache.http.message.BasicLineParserHC4的实例源码
DefaultHttpResponseParserFactory.java 文件源码
项目:remote-files-sync
阅读 26
收藏 0
点赞 0
评论 0
DefaultHttpResponseParserFactory.java 文件源码
项目:remote-files-sync
阅读 29
收藏 0
点赞 0
评论 0
public DefaultHttpResponseParserFactory(final LineParser lineParser,
final HttpResponseFactory responseFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.responseFactory = responseFactory != null ? responseFactory
: DefaultHttpResponseFactoryHC4.INSTANCE;
}
DefaultHttpRequestParserFactory.java 文件源码
项目:remote-files-sync
阅读 37
收藏 0
点赞 0
评论 0
public DefaultHttpRequestParserFactory(final LineParser lineParser,
final HttpRequestFactory requestFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.requestFactory = requestFactory != null ? requestFactory
: DefaultHttpRequestFactoryHC4.INSTANCE;
}
AbstractMessageParserHC4.java 文件源码
项目:remote-files-sync
阅读 24
收藏 0
点赞 0
评论 0
/**
* 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;
}
AbstractMessageParserHC4.java 文件源码
项目:remote-files-sync
阅读 33
收藏 0
点赞 0
评论 0
/**
* Creates new instance of AbstractMessageParserHC4.
*
* @param buffer the session input buffer.
* @param lineParser the line parser. If <code>null</code> {@link BasicLineParserHC4#INSTANCE}
* will be used.
* @param constraints the message constraints. If <code>null</code>
* {@link MessageConstraints#DEFAULT} will be used.
*
* @since 4.3
*/
public AbstractMessageParserHC4(
final SessionInputBuffer buffer,
final LineParser lineParser,
final MessageConstraints constraints) {
super();
this.sessionBuffer = Args.notNull(buffer, "Session input buffer");
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.messageConstraints = constraints != null ? constraints : MessageConstraints.DEFAULT;
this.headerLines = new ArrayList<CharArrayBuffer>();
this.state = HEAD_LINE;
}
DefaultHttpResponseParserFactory.java 文件源码
项目:Visit
阅读 24
收藏 0
点赞 0
评论 0
public DefaultHttpResponseParserFactory(
final LineParser lineParser,
final HttpResponseFactory responseFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.responseFactory = responseFactory != null ? responseFactory
: DefaultHttpResponseFactoryHC4.INSTANCE;
}
DefaultHttpResponseParserFactory.java 文件源码
项目:Visit
阅读 29
收藏 0
点赞 0
评论 0
public DefaultHttpResponseParserFactory(final LineParser lineParser,
final HttpResponseFactory responseFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.responseFactory = responseFactory != null ? responseFactory
: DefaultHttpResponseFactoryHC4.INSTANCE;
}
DefaultHttpRequestParserFactory.java 文件源码
项目:Visit
阅读 29
收藏 0
点赞 0
评论 0
public DefaultHttpRequestParserFactory(final LineParser lineParser,
final HttpRequestFactory requestFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.requestFactory = requestFactory != null ? requestFactory
: DefaultHttpRequestFactoryHC4.INSTANCE;
}
AbstractMessageParserHC4.java 文件源码
项目:Visit
阅读 30
收藏 0
点赞 0
评论 0
/**
* 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;
}
AbstractMessageParserHC4.java 文件源码
项目:Visit
阅读 32
收藏 0
点赞 0
评论 0
/**
* Creates new instance of AbstractMessageParserHC4.
*
* @param buffer the session input buffer.
* @param lineParser the line parser. If <code>null</code> {@link BasicLineParserHC4#INSTANCE}
* will be used.
* @param constraints the message constraints. If <code>null</code>
* {@link MessageConstraints#DEFAULT} will be used.
*
* @since 4.3
*/
public AbstractMessageParserHC4(
final SessionInputBuffer buffer,
final LineParser lineParser,
final MessageConstraints constraints) {
super();
this.sessionBuffer = Args.notNull(buffer, "Session input buffer");
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.messageConstraints = constraints != null ? constraints : MessageConstraints.DEFAULT;
this.headerLines = new ArrayList<CharArrayBuffer>();
this.state = HEAD_LINE;
}
DefaultHttpResponseParserFactory.java 文件源码
项目:ZTLib
阅读 31
收藏 0
点赞 0
评论 0
public DefaultHttpResponseParserFactory(
final LineParser lineParser,
final HttpResponseFactory responseFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.responseFactory = responseFactory != null ? responseFactory
: DefaultHttpResponseFactoryHC4.INSTANCE;
}
DefaultHttpResponseParserFactory.java 文件源码
项目:ZTLib
阅读 32
收藏 0
点赞 0
评论 0
public DefaultHttpResponseParserFactory(final LineParser lineParser,
final HttpResponseFactory responseFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.responseFactory = responseFactory != null ? responseFactory
: DefaultHttpResponseFactoryHC4.INSTANCE;
}
DefaultHttpRequestParserFactory.java 文件源码
项目:ZTLib
阅读 32
收藏 0
点赞 0
评论 0
public DefaultHttpRequestParserFactory(final LineParser lineParser,
final HttpRequestFactory requestFactory) {
super();
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.requestFactory = requestFactory != null ? requestFactory
: DefaultHttpRequestFactoryHC4.INSTANCE;
}
AbstractMessageParserHC4.java 文件源码
项目:ZTLib
阅读 36
收藏 0
点赞 0
评论 0
/**
* 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;
}
AbstractMessageParserHC4.java 文件源码
项目:ZTLib
阅读 33
收藏 0
点赞 0
评论 0
/**
* Creates new instance of AbstractMessageParserHC4.
*
* @param buffer the session input buffer.
* @param lineParser the line parser. If <code>null</code> {@link BasicLineParserHC4#INSTANCE}
* will be used.
* @param constraints the message constraints. If <code>null</code>
* {@link MessageConstraints#DEFAULT} will be used.
*
* @since 4.3
*/
public AbstractMessageParserHC4(
final SessionInputBuffer buffer,
final LineParser lineParser,
final MessageConstraints constraints) {
super();
this.sessionBuffer = Args.notNull(buffer, "Session input buffer");
this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
this.messageConstraints = constraints != null ? constraints : MessageConstraints.DEFAULT;
this.headerLines = new ArrayList<CharArrayBuffer>();
this.state = HEAD_LINE;
}
AbstractMessageParserHC4.java 文件源码
项目:remote-files-sync
阅读 54
收藏 0
点赞 0
评论 0
/**
* Parses HTTP headers from the data receiver stream according to the generic
* format as given in Section 3.1 of RFC 822, RFC-2616 Section 4 and 19.3.
*
* @param inbuffer Session input buffer
* @param maxHeaderCount maximum number of headers allowed. If the number
* of headers received from the data stream exceeds maxCount value, an
* IOException will be thrown. Setting this parameter to a negative value
* or zero will disable the check.
* @param maxLineLen maximum number of characters for a header line,
* including the continuation lines. Setting this parameter to a negative
* value or zero will disable the check.
* @return array of HTTP headers
* @param parser line parser to use. Can be <code>null</code>, in which case
* the default implementation of this interface will be used.
*
* @throws IOException in case of an I/O error
* @throws HttpException in case of HTTP protocol violation
*/
public static Header[] parseHeaders(
final SessionInputBuffer inbuffer,
final int maxHeaderCount,
final int maxLineLen,
final LineParser parser) throws HttpException, IOException {
final List<CharArrayBuffer> headerLines = new ArrayList<CharArrayBuffer>();
return parseHeaders(inbuffer, maxHeaderCount, maxLineLen,
parser != null ? parser : BasicLineParserHC4.INSTANCE,
headerLines);
}
AbstractMessageParserHC4.java 文件源码
项目:Visit
阅读 25
收藏 0
点赞 0
评论 0
/**
* Parses HTTP headers from the data receiver stream according to the generic
* format as given in Section 3.1 of RFC 822, RFC-2616 Section 4 and 19.3.
*
* @param inbuffer Session input buffer
* @param maxHeaderCount maximum number of headers allowed. If the number
* of headers received from the data stream exceeds maxCount value, an
* IOException will be thrown. Setting this parameter to a negative value
* or zero will disable the check.
* @param maxLineLen maximum number of characters for a header line,
* including the continuation lines. Setting this parameter to a negative
* value or zero will disable the check.
* @return array of HTTP headers
* @param parser line parser to use. Can be <code>null</code>, in which case
* the default implementation of this interface will be used.
*
* @throws IOException in case of an I/O error
* @throws HttpException in case of HTTP protocol violation
*/
public static Header[] parseHeaders(
final SessionInputBuffer inbuffer,
final int maxHeaderCount,
final int maxLineLen,
final LineParser parser) throws HttpException, IOException {
final List<CharArrayBuffer> headerLines = new ArrayList<CharArrayBuffer>();
return parseHeaders(inbuffer, maxHeaderCount, maxLineLen,
parser != null ? parser : BasicLineParserHC4.INSTANCE,
headerLines);
}
AbstractMessageParserHC4.java 文件源码
项目:ZTLib
阅读 32
收藏 0
点赞 0
评论 0
/**
* Parses HTTP headers from the data receiver stream according to the generic
* format as given in Section 3.1 of RFC 822, RFC-2616 Section 4 and 19.3.
*
* @param inbuffer Session input buffer
* @param maxHeaderCount maximum number of headers allowed. If the number
* of headers received from the data stream exceeds maxCount value, an
* IOException will be thrown. Setting this parameter to a negative value
* or zero will disable the check.
* @param maxLineLen maximum number of characters for a header line,
* including the continuation lines. Setting this parameter to a negative
* value or zero will disable the check.
* @return array of HTTP headers
* @param parser line parser to use. Can be <code>null</code>, in which case
* the default implementation of this interface will be used.
*
* @throws IOException in case of an I/O error
* @throws HttpException in case of HTTP protocol violation
*/
public static Header[] parseHeaders(
final SessionInputBuffer inbuffer,
final int maxHeaderCount,
final int maxLineLen,
final LineParser parser) throws HttpException, IOException {
final List<CharArrayBuffer> headerLines = new ArrayList<CharArrayBuffer>();
return parseHeaders(inbuffer, maxHeaderCount, maxLineLen,
parser != null ? parser : BasicLineParserHC4.INSTANCE,
headerLines);
}