Java Doc for HttpVersion.java in  » Net » Apache-common-HttpClient » org » apache » commons » httpclient » 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 » Net » Apache common HttpClient » org.apache.commons.httpclient 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.httpclient.HttpVersion

HttpVersion
public class HttpVersion implements Comparable(Code)

HTTP version, as specified in RFC 2616.

HTTP uses a "<major>.<minor>" numbering scheme to indicate versions of the protocol. The protocol versioning policy is intended to allow the sender to indicate the format of a message and its capacity for understanding further HTTP communication, rather than the features obtained via that communication. No change is made to the version number for the addition of message components which do not affect communication behavior or which only add to extensible field values. The <minor> number is incremented when the changes made to the protocol add features which do not change the general message parsing algorithm, but which may add to the message semantics and imply additional capabilities of the sender. The <major> number is incremented when the format of a message within the protocol is changed. See RFC 2145 [36] for a fuller explanation.

The version of an HTTP message is indicated by an HTTP-Version field in the first line of the message.

 HTTP-Version   = "HTTP" "/" 1*DIGIT "." 1*DIGIT
 

Note that the major and minor numbers MUST be treated as separate integers and that each MAY be incremented higher than a single digit. Thus, HTTP/2.4 is a lower version than HTTP/2.13, which in turn is lower than HTTP/12.3. Leading zeros MUST be ignored by recipients and MUST NOT be sent.


author:
   Oleg Kalnichevski
version:
   $Revision: 480424 $ $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $
since:
   3.0


Field Summary
final public static  HttpVersionHTTP_0_9
    
final public static  HttpVersionHTTP_1_0
    
final public static  HttpVersionHTTP_1_1
    

Constructor Summary
public  HttpVersion(int major, int minor)
     Create an HTTP protocol version designator.

Method Summary
public  intcompareTo(HttpVersion anotherVer)
     Compares this HTTP protocol version with another one.
Parameters:
  anotherVer - the version to be compared with.
public  intcompareTo(Object o)
    
public  booleanequals(Object obj)
    
public  booleanequals(HttpVersion version)
     Test if the HTTP protocol version is equal to the given number.
public  intgetMajor()
     Returns the major version number of the HTTP protocol.
public  intgetMinor()
     Returns the minor version number of the HTTP protocol.
public  booleangreaterEquals(HttpVersion version)
     Test if the HTTP protocol version is greater or equal to the given number.
public  inthashCode()
    
public  booleanlessEquals(HttpVersion version)
     Test if the HTTP protocol version is less or equal to the given number.
public static  HttpVersionparse(String s)
     Parses the textual representation of the given HTTP protocol version. HTTP protocol version.
throws:
  ProtocolException - if the string is not a valid HTTP protocol version.
public  StringtoString()
    

Field Detail
HTTP_0_9
final public static HttpVersion HTTP_0_9(Code)
HTTP protocol version 0.9



HTTP_1_0
final public static HttpVersion HTTP_1_0(Code)
HTTP protocol version 1.0



HTTP_1_1
final public static HttpVersion HTTP_1_1(Code)
HTTP protocol version 1.1




Constructor Detail
HttpVersion
public HttpVersion(int major, int minor)(Code)
Create an HTTP protocol version designator.
Parameters:
  major - the major version number of the HTTP protocol
Parameters:
  minor - the minor version number of the HTTP protocol
throws:
  IllegalArgumentException - if either major or minor version number is negative




Method Detail
compareTo
public int compareTo(HttpVersion anotherVer)(Code)
Compares this HTTP protocol version with another one.
Parameters:
  anotherVer - the version to be compared with. a negative integer, zero, or a positive integer as this version is less than, equal to, or greater than the specified version.



compareTo
public int compareTo(Object o)(Code)

See Also:   java.lang.Comparable.compareTo(java.lang.Object)



equals
public boolean equals(Object obj)(Code)

See Also:   java.lang.Object.equals(java.lang.Object)



equals
public boolean equals(HttpVersion version)(Code)
Test if the HTTP protocol version is equal to the given number. true if HTTP protocol version is given to the given number, false otherwise.



getMajor
public int getMajor()(Code)
Returns the major version number of the HTTP protocol. the major version number.



getMinor
public int getMinor()(Code)
Returns the minor version number of the HTTP protocol. the minor version number.



greaterEquals
public boolean greaterEquals(HttpVersion version)(Code)
Test if the HTTP protocol version is greater or equal to the given number. true if HTTP protocol version is greater or equal given to the given number, false otherwise.



hashCode
public int hashCode()(Code)

See Also:   java.lang.Object.hashCode



lessEquals
public boolean lessEquals(HttpVersion version)(Code)
Test if the HTTP protocol version is less or equal to the given number. true if HTTP protocol version is less or equal to given to the given number, false otherwise.



parse
public static HttpVersion parse(String s) throws ProtocolException(Code)
Parses the textual representation of the given HTTP protocol version. HTTP protocol version.
throws:
  ProtocolException - if the string is not a valid HTTP protocol version.



toString
public String toString()(Code)

See Also:   java.lang.Object.toString



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.