michael@0: /*
michael@0: * ====================================================================
michael@0: * Licensed to the Apache Software Foundation (ASF) under one
michael@0: * or more contributor license agreements. See the NOTICE file
michael@0: * distributed with this work for additional information
michael@0: * regarding copyright ownership. The ASF licenses this file
michael@0: * to you under the Apache License, Version 2.0 (the
michael@0: * "License"); you may not use this file except in compliance
michael@0: * with the License. You may obtain a copy of the License at
michael@0: *
michael@0: * http://www.apache.org/licenses/LICENSE-2.0
michael@0: *
michael@0: * Unless required by applicable law or agreed to in writing,
michael@0: * software distributed under the License is distributed on an
michael@0: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
michael@0: * KIND, either express or implied. See the License for the
michael@0: * specific language governing permissions and limitations
michael@0: * under the License.
michael@0: * ====================================================================
michael@0: *
michael@0: * This software consists of voluntary contributions made by many
michael@0: * individuals on behalf of the Apache Software Foundation. For more
michael@0: * information on the Apache Software Foundation, please see
michael@0: *
The HTTP header fields follow the same generic format as michael@0: * that given in Section 3.1 of RFC 822. Each header field consists michael@0: * of a name followed by a colon (":") and the field value. Field names michael@0: * are case-insensitive. The field value MAY be preceded by any amount michael@0: * of LWS, though a single SP is preferred. michael@0: * michael@0: *
michael@0: * message-header = field-name ":" [ field-value ] michael@0: * field-name = token michael@0: * field-value = *( field-content | LWS ) michael@0: * field-content = <the OCTETs making up the field-value michael@0: * and consisting of either *TEXT or combinations michael@0: * of token, separators, and quoted-string> michael@0: *michael@0: * michael@0: * @since 4.0 michael@0: */ michael@0: public interface Header { michael@0: michael@0: /** michael@0: * Get the name of the Header. michael@0: * michael@0: * @return the name of the Header, never {@code null} michael@0: */ michael@0: String getName(); michael@0: michael@0: /** michael@0: * Get the value of the Header. michael@0: * michael@0: * @return the value of the Header, may be {@code null} michael@0: */ michael@0: String getValue(); michael@0: michael@0: /** michael@0: * Parses the value. michael@0: * michael@0: * @return an array of {@link HeaderElement} entries, may be empty, but is never {@code null} michael@0: * @throws ParseException michael@0: */ michael@0: HeaderElement[] getElements() throws ParseException; michael@0: michael@0: }