001: /*
002: * $HeadURL: https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0-beta1/module-main/src/main/java/org/apache/http/NameValuePair.java $
003: * $Revision: 496070 $
004: * $Date: 2007-01-14 13:18:34 +0100 (Sun, 14 Jan 2007) $
005: *
006: * ====================================================================
007: * Licensed to the Apache Software Foundation (ASF) under one
008: * or more contributor license agreements. See the NOTICE file
009: * distributed with this work for additional information
010: * regarding copyright ownership. The ASF licenses this file
011: * to you under the Apache License, Version 2.0 (the
012: * "License"); you may not use this file except in compliance
013: * with the License. You may obtain a copy of the License at
014: *
015: * http://www.apache.org/licenses/LICENSE-2.0
016: *
017: * Unless required by applicable law or agreed to in writing,
018: * software distributed under the License is distributed on an
019: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
020: * KIND, either express or implied. See the License for the
021: * specific language governing permissions and limitations
022: * under the License.
023: * ====================================================================
024: *
025: * This software consists of voluntary contributions made by many
026: * individuals on behalf of the Apache Software Foundation. For more
027: * information on the Apache Software Foundation, please see
028: * <http://www.apache.org/>.
029: *
030: */
031:
032: package org.apache.http;
033:
034: /**
035: * A simple class encapsulating an attribute/value pair.
036: * <p>
037: * This class comforms to the generic grammar and formatting rules outlined in the
038: * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2">Section 2.2</a>
039: * and
040: * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6">Section 3.6</a>
041: * of <a href="http://www.w3.org/Protocols/rfc2616/rfc2616.txt">RFC 2616</a>
042: * </p>
043: * <h>2.2 Basic Rules</h>
044: * <p>
045: * The following rules are used throughout this specification to describe basic parsing constructs.
046: * The US-ASCII coded character set is defined by ANSI X3.4-1986.
047: * </p>
048: * <pre>
049: * OCTET = <any 8-bit sequence of data>
050: * CHAR = <any US-ASCII character (octets 0 - 127)>
051: * UPALPHA = <any US-ASCII uppercase letter "A".."Z">
052: * LOALPHA = <any US-ASCII lowercase letter "a".."z">
053: * ALPHA = UPALPHA | LOALPHA
054: * DIGIT = <any US-ASCII digit "0".."9">
055: * CTL = <any US-ASCII control character
056: * (octets 0 - 31) and DEL (127)>
057: * CR = <US-ASCII CR, carriage return (13)>
058: * LF = <US-ASCII LF, linefeed (10)>
059: * SP = <US-ASCII SP, space (32)>
060: * HT = <US-ASCII HT, horizontal-tab (9)>
061: * <"> = <US-ASCII double-quote mark (34)>
062: * </pre>
063: * <p>
064: * Many HTTP/1.1 header field values consist of words separated by LWS or special
065: * characters. These special characters MUST be in a quoted string to be used within
066: * a parameter value (as defined in section 3.6).
067: * <p>
068: * <pre>
069: * token = 1*<any CHAR except CTLs or separators>
070: * separators = "(" | ")" | "<" | ">" | "@"
071: * | "," | ";" | ":" | "\" | <">
072: * | "/" | "[" | "]" | "?" | "="
073: * | "{" | "}" | SP | HT
074: * </pre>
075: * <p>
076: * A string of text is parsed as a single word if it is quoted using double-quote marks.
077: * </p>
078: * <pre>
079: * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
080: * qdtext = <any TEXT except <">>
081: * </pre>
082: * <p>
083: * The backslash character ("\") MAY be used as a single-character quoting mechanism only
084: * within quoted-string and comment constructs.
085: * </p>
086: * <pre>
087: * quoted-pair = "\" CHAR
088: * </pre>
089: * <h>3.6 Transfer Codings</h>
090: * <p>
091: * Parameters are in the form of attribute/value pairs.
092: * </p>
093: * <pre>
094: * parameter = attribute "=" value
095: * attribute = token
096: * value = token | quoted-string
097: * </pre>
098: *
099: * @author <a href="mailto:oleg at ural.com">Oleg Kalnichevski</a>
100: *
101: */
102: public interface NameValuePair {
103:
104: String getName();
105:
106: String getValue();
107:
108: }
|