Java 类org.apache.http.message.BasicLineParserHC4 实例源码

项目:remote-files-sync    文件:DefaultHttpResponseParserFactory.java   
public DefaultHttpResponseParserFactory(
        final LineParser lineParser,
        final HttpResponseFactory responseFactory) {
    super();
    this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
    this.responseFactory = responseFactory != null ? responseFactory
            : DefaultHttpResponseFactoryHC4.INSTANCE;
}
项目:remote-files-sync    文件:DefaultHttpResponseParserFactory.java   
public DefaultHttpResponseParserFactory(final LineParser lineParser,
        final HttpResponseFactory responseFactory) {
    super();
    this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
    this.responseFactory = responseFactory != null ? responseFactory
            : DefaultHttpResponseFactoryHC4.INSTANCE;
}
项目:remote-files-sync    文件:DefaultHttpRequestParserFactory.java   
public DefaultHttpRequestParserFactory(final LineParser lineParser,
        final HttpRequestFactory requestFactory) {
    super();
    this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
    this.requestFactory = requestFactory != null ? requestFactory
            : DefaultHttpRequestFactoryHC4.INSTANCE;
}
项目:remote-files-sync    文件:AbstractMessageParserHC4.java   
/**
 * 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;
}
项目:remote-files-sync    文件:AbstractMessageParserHC4.java   
/**
 * 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;
}
项目:Visit    文件:DefaultHttpResponseParserFactory.java   
public DefaultHttpResponseParserFactory(
        final LineParser lineParser,
        final HttpResponseFactory responseFactory) {
    super();
    this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
    this.responseFactory = responseFactory != null ? responseFactory
            : DefaultHttpResponseFactoryHC4.INSTANCE;
}
项目:Visit    文件:DefaultHttpResponseParserFactory.java   
public DefaultHttpResponseParserFactory(final LineParser lineParser,
        final HttpResponseFactory responseFactory) {
    super();
    this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
    this.responseFactory = responseFactory != null ? responseFactory
            : DefaultHttpResponseFactoryHC4.INSTANCE;
}
项目:Visit    文件:DefaultHttpRequestParserFactory.java   
public DefaultHttpRequestParserFactory(final LineParser lineParser,
        final HttpRequestFactory requestFactory) {
    super();
    this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
    this.requestFactory = requestFactory != null ? requestFactory
            : DefaultHttpRequestFactoryHC4.INSTANCE;
}
项目:Visit    文件:AbstractMessageParserHC4.java   
/**
 * 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;
}
项目:Visit    文件:AbstractMessageParserHC4.java   
/**
 * 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;
}
项目:ZTLib    文件:DefaultHttpResponseParserFactory.java   
public DefaultHttpResponseParserFactory(
        final LineParser lineParser,
        final HttpResponseFactory responseFactory) {
    super();
    this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
    this.responseFactory = responseFactory != null ? responseFactory
            : DefaultHttpResponseFactoryHC4.INSTANCE;
}
项目:ZTLib    文件:DefaultHttpResponseParserFactory.java   
public DefaultHttpResponseParserFactory(final LineParser lineParser,
        final HttpResponseFactory responseFactory) {
    super();
    this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
    this.responseFactory = responseFactory != null ? responseFactory
            : DefaultHttpResponseFactoryHC4.INSTANCE;
}
项目:ZTLib    文件:DefaultHttpRequestParserFactory.java   
public DefaultHttpRequestParserFactory(final LineParser lineParser,
        final HttpRequestFactory requestFactory) {
    super();
    this.lineParser = lineParser != null ? lineParser : BasicLineParserHC4.INSTANCE;
    this.requestFactory = requestFactory != null ? requestFactory
            : DefaultHttpRequestFactoryHC4.INSTANCE;
}
项目:ZTLib    文件:AbstractMessageParserHC4.java   
/**
 * 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;
}
项目:ZTLib    文件:AbstractMessageParserHC4.java   
/**
 * 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;
}
项目:remote-files-sync    文件:AbstractMessageParserHC4.java   
/**
 * 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);
}
项目:Visit    文件:AbstractMessageParserHC4.java   
/**
 * 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);
}
项目:ZTLib    文件:AbstractMessageParserHC4.java   
/**
 * 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);
}