org.eclipse.webdav.http.client
Class HttpConnection.Header

java.lang.Object
  extended by org.eclipse.webdav.http.client.HttpConnection.Header
Enclosing class:
HttpConnection

public class HttpConnection.Header
extends Object

A request or response header.


Constructor Summary
HttpConnection.Header()
           
 
Method Summary
 void addField(String fieldName, String fieldValue)
          Adds the specified header field to this header.
 void clear()
          Removes all header fields from this header.
 String getFieldName(int position)
          Returns the field name of the header field at the given position, or null if there is no such position.
 String getFieldValue(int position)
          Returns the field value of the header field at the given position, or null if there is no such postition.
 String getFieldValue(String fieldName)
          Returns the field value of the header field with the given field name, or null if there is no such field name.
 int size()
          Returns the number of header fields in this header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpConnection.Header

public HttpConnection.Header()
Method Detail

addField

public void addField(String fieldName,
                     String fieldValue)
Adds the specified header field to this header.

Parameters:
fieldName - the new header field's name
fieldValue - the new header field's value

clear

public void clear()
Removes all header fields from this header.


getFieldValue

public String getFieldValue(int position)
Returns the field value of the header field at the given position, or null if there is no such postition.

Parameters:
position - the position of a header field
Returns:
the field value of the header field at the given position

getFieldValue

public String getFieldValue(String fieldName)
Returns the field value of the header field with the given field name, or null if there is no such field name.

Parameters:
fieldName - the name of a header field
Returns:
the field value of the header field with the given field name

getFieldName

public String getFieldName(int position)
Returns the field name of the header field at the given position, or null if there is no such position.

Parameters:
position - the position of a header field in this header
Returns:
the field name of the header field at the given position

size

public int size()
Returns the number of header fields in this header.

Returns:
the number of header fields in this header


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.