Java Doc for HttpFields.java in  » Sevlet-Container » jetty-modules » org » mortbay » jetty » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » jetty modules » org.mortbay.jetty 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mortbay.jetty.HttpFields

HttpFields
public class HttpFields (Code)
HTTP Fields. A collection of HTTP header and or Trailer fields. This class is not synchronized and needs to be protected from concurrent access. This class is not synchronized as it is expected that modifications will only be performed by a single thread.
author:
   Greg Wilkins (gregw)

Inner Class :final public static class Field

Field Summary
final public static  String__01Jan1970
    
final public static  Buffer__01Jan1970_BUFFER
    
final public static  DateCache__dateCache
    
final public static  String__separators
    
protected  HashMap_bufferMap
    
protected  SimpleDateFormat_dateReceive
    
protected  ArrayList_fields
    
protected  int_revision
    

Constructor Summary
public  HttpFields()
     Constructor.

Method Summary
public  voidadd(String name, String value)
     Add to or set a field.
public  voidadd(Buffer name, Buffer value)
     Add to or set a field.
public  voidadd(HttpFields fields)
     Add fields from another HttpFields instance.
public  voidaddDateField(String name, long date)
     Sets the value of a date field.
public  voidaddLongField(String name, long value)
     Sets the value of an long field.
public  voidaddLongField(Buffer name, long value)
     Sets the value of an long field.
public  voidaddSetCookie(Cookie cookie)
    
public  voidclear()
     Clear the header.
public  booleancontainsKey(Buffer name)
    
public  booleancontainsKey(String name)
    
public  voiddestroy()
     Destroy the header.
public static  StringformatDate(long date, boolean cookie)
    
public static  StringformatDate(Calendar calendar, boolean cookie)
    
public static  StringformatDate(StringBuffer buf, long date, boolean cookie)
    
public static  voidformatDate(StringBuffer buf, Calendar calendar, boolean cookie)
    
public  Bufferget(Buffer name)
     the value of a field, or null if not found.
public  longgetDateField(String name)
     Get a header as a date value.
public  EnumerationgetFieldNames()
     Get enumeration of header _names.
public  IteratorgetFields()
     Get enumeration of Fields Returns an enumeration of Fields for this request.
public  longgetLongField(String name)
     Get a header as an long value.
public  longgetLongField(Buffer name)
     Get a header as an long value.
public static  FloatgetQuality(String value)
    
public  StringgetStringField(String name)
     the value of a field, or null if not found.
public  StringgetStringField(Buffer name)
     the value of a field, or null if not found.
public  EnumerationgetValues(String name)
    
public  EnumerationgetValues(Buffer name)
    
public  EnumerationgetValues(String name, String separators)
     Get multi field values with separator.
public  voidput(String name, String value)
     Set a field.
Parameters:
  name - the name of the field
Parameters:
  value - the value of the field.
public  voidput(Buffer name, String value)
     Set a field.
Parameters:
  name - the name of the field
Parameters:
  value - the value of the field.
public  voidput(Buffer name, Buffer value)
     Set a field.
Parameters:
  name - the name of the field
Parameters:
  value - the value of the field.
public  voidput(String name, List list)
     Set a field.
Parameters:
  name - the name of the field
Parameters:
  list - the List value of the field.
public  voidput(Buffer buffer)
    
public  voidputDateField(Buffer name, long date)
     Sets the value of a date field.
public  voidputDateField(String name, long date)
     Sets the value of a date field.
public  voidputLongField(Buffer name, long value)
     Sets the value of an long field.
public  voidputLongField(String name, long value)
     Sets the value of an long field.
public static  ListqualityList(Enumeration e)
     List values in quality order.
public  voidremove(String name)
     Remove a field.
public  voidremove(Buffer name)
     Remove a field.
public  StringtoString()
    
public static  StringvalueParameters(String value, Map parameters)
     Get field value parameters.
public  voidwrite(Writer writer)
    

Field Detail
__01Jan1970
final public static String __01Jan1970(Code)



__01Jan1970_BUFFER
final public static Buffer __01Jan1970_BUFFER(Code)



__dateCache
final public static DateCache __dateCache(Code)



__separators
final public static String __separators(Code)



_bufferMap
protected HashMap _bufferMap(Code)



_dateReceive
protected SimpleDateFormat _dateReceive(Code)



_fields
protected ArrayList _fields(Code)



_revision
protected int _revision(Code)




Constructor Detail
HttpFields
public HttpFields()(Code)
Constructor.




Method Detail
add
public void add(String name, String value) throws IllegalArgumentException(Code)
Add to or set a field. If the field is allowed to have multiple values, add will add multiple headers of the same name.
Parameters:
  name - the name of the field
Parameters:
  value - the value of the field.
exception:
  IllegalArgumentException - If the name is a single valued field and already has avalue.



add
public void add(Buffer name, Buffer value) throws IllegalArgumentException(Code)
Add to or set a field. If the field is allowed to have multiple values, add will add multiple headers of the same name.
Parameters:
  name - the name of the field
Parameters:
  value - the value of the field.
exception:
  IllegalArgumentException - If the name is a single valued field and already has avalue.



add
public void add(HttpFields fields)(Code)
Add fields from another HttpFields instance. Single valued fields are replaced, while all others are added.
Parameters:
  fields -



addDateField
public void addDateField(String name, long date)(Code)
Sets the value of a date field.
Parameters:
  name - the field name
Parameters:
  date - the field date value



addLongField
public void addLongField(String name, long value)(Code)
Sets the value of an long field.
Parameters:
  name - the field name
Parameters:
  value - the field long value



addLongField
public void addLongField(Buffer name, long value)(Code)
Sets the value of an long field.
Parameters:
  name - the field name
Parameters:
  value - the field long value



addSetCookie
public void addSetCookie(Cookie cookie)(Code)
Format a set cookie value
Parameters:
  cookie - The cookie.
Parameters:
  cookie2 - If true, use the alternate cookie 2 header



clear
public void clear()(Code)
Clear the header.



containsKey
public boolean containsKey(Buffer name)(Code)



containsKey
public boolean containsKey(String name)(Code)



destroy
public void destroy()(Code)
Destroy the header. Help the garbage collector by null everything that we can.



formatDate
public static String formatDate(long date, boolean cookie)(Code)
Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'" or "EEE, dd-MMM-yy HH:mm:ss 'GMT'"for cookies



formatDate
public static String formatDate(Calendar calendar, boolean cookie)(Code)
Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'" or "EEE, dd-MMM-yy HH:mm:ss 'GMT'"for cookies



formatDate
public static String formatDate(StringBuffer buf, long date, boolean cookie)(Code)
Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'" or "EEE, dd-MMM-yy HH:mm:ss 'GMT'"for cookies



formatDate
public static void formatDate(StringBuffer buf, Calendar calendar, boolean cookie)(Code)
Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'" or "EEE, dd-MMM-yy HH:mm:ss 'GMT'"for cookies



get
public Buffer get(Buffer name)(Code)
the value of a field, or null if not found. For multiple fields of the same name,only the first is returned.
Parameters:
  name - the case-insensitive field name



getDateField
public long getDateField(String name)(Code)
Get a header as a date value. Returns the value of a date field, or -1 if not found. The case of the field name is ignored.
Parameters:
  name - the case-insensitive field name



getFieldNames
public Enumeration getFieldNames()(Code)
Get enumeration of header _names. Returns an enumeration of strings representing the header _names for this request.



getFields
public Iterator getFields()(Code)
Get enumeration of Fields Returns an enumeration of Fields for this request.



getLongField
public long getLongField(String name) throws NumberFormatException(Code)
Get a header as an long value. Returns the value of an integer field or -1 if not found. The case of the field name is ignored.
Parameters:
  name - the case-insensitive field name
exception:
  NumberFormatException - If bad long found



getLongField
public long getLongField(Buffer name) throws NumberFormatException(Code)
Get a header as an long value. Returns the value of an integer field or -1 if not found. The case of the field name is ignored.
Parameters:
  name - the case-insensitive field name
exception:
  NumberFormatException - If bad long found



getQuality
public static Float getQuality(String value)(Code)



getStringField
public String getStringField(String name)(Code)
the value of a field, or null if not found. For multiple fields of the same name,only the first is returned.
Parameters:
  name - the case-insensitive field name



getStringField
public String getStringField(Buffer name)(Code)
the value of a field, or null if not found. For multiple fields of the same name,only the first is returned.
Parameters:
  name - the case-insensitive field name



getValues
public Enumeration getValues(String name)(Code)
Get multi headers Enumeration of the values, or null if no such header.
Parameters:
  name - the case-insensitive field name



getValues
public Enumeration getValues(Buffer name)(Code)
Get multi headers Enumeration of the value Strings, or null if no such header.
Parameters:
  name - the case-insensitive field name



getValues
public Enumeration getValues(String name, String separators)(Code)
Get multi field values with separator. The multiple values can be represented as separate headers of the same name, or by a single header using the separator(s), or a combination of both. Separators may be quoted.
Parameters:
  name - the case-insensitive field name
Parameters:
  separators - String of separators. Enumeration of the values, or null if no such header.



put
public void put(String name, String value)(Code)
Set a field.
Parameters:
  name - the name of the field
Parameters:
  value - the value of the field. If null the field is cleared.



put
public void put(Buffer name, String value)(Code)
Set a field.
Parameters:
  name - the name of the field
Parameters:
  value - the value of the field. If null the field is cleared.



put
public void put(Buffer name, Buffer value)(Code)
Set a field.
Parameters:
  name - the name of the field
Parameters:
  value - the value of the field. If null the field is cleared.



put
public void put(String name, List list)(Code)
Set a field.
Parameters:
  name - the name of the field
Parameters:
  list - the List value of the field. If null the field is cleared.



put
public void put(Buffer buffer) throws IOException(Code)



putDateField
public void putDateField(Buffer name, long date)(Code)
Sets the value of a date field.
Parameters:
  name - the field name
Parameters:
  date - the field date value



putDateField
public void putDateField(String name, long date)(Code)
Sets the value of a date field.
Parameters:
  name - the field name
Parameters:
  date - the field date value



putLongField
public void putLongField(Buffer name, long value)(Code)
Sets the value of an long field.
Parameters:
  name - the field name
Parameters:
  value - the field long value



putLongField
public void putLongField(String name, long value)(Code)
Sets the value of an long field.
Parameters:
  name - the field name
Parameters:
  value - the field long value



qualityList
public static List qualityList(Enumeration e)(Code)
List values in quality order. enum Enumeration of values with quality parameters values in quality order.



remove
public void remove(String name)(Code)
Remove a field.
Parameters:
  name -



remove
public void remove(Buffer name)(Code)
Remove a field.
Parameters:
  name -



toString
public String toString()(Code)



valueParameters
public static String valueParameters(String value, Map parameters)(Code)
Get field value parameters. Some field values can have parameters. This method separates the value from the parameters and optionally populates a map with the paramters. For example:
 FieldName : Value ; param1=val1 ; param2=val2
 

Parameters:
  value - The Field value, possibly with parameteres.
Parameters:
  parameters - A map to populate with the parameters, or null The value.



write
public void write(Writer writer) throws IOException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.