|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.noderunner.http.HttpVersion
public class HttpVersion
This represents an HTTP-Version
data object, as found in RFC
2616. It is immutable.
Field Summary | |
---|---|
static java.lang.String |
HTTP_VERSION_BEGIN
The string HTTP/ . |
static HttpVersion |
HTTP10
Represents HTTP version 1.0 |
static HttpVersion |
HTTP11
Represents HTTP version 1.1 |
Constructor Summary | |
---|---|
HttpVersion(int major,
int minor)
Constructs a HttpVersionImpl out of version number parts. |
|
HttpVersion(java.lang.String line)
Constructs a HttpVersionImpl out of a parsable String. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object other)
Returns true if the other object is an HttpVersion with the same minor and major versions. |
int |
getMajorVersion()
Returns the major version number in use. |
int |
getMinorVersion()
Returns the minor version number in use. |
int |
hashCode()
Returns the hashcode. |
static HttpVersion |
parseVersion(java.lang.String version)
Based on the string supplied, returns either HttpVersion.HTTP10 or HttpVersion.HTTP11 or
a newly constructed HttpVersion instance. |
java.lang.String |
toString()
Returns |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final HttpVersion HTTP11
public static final HttpVersion HTTP10
public static final java.lang.String HTTP_VERSION_BEGIN
HTTP/
.
Constructor Detail |
---|
public HttpVersion(java.lang.String line) throws HttpException
HttpVersionImpl
out of a parsable String.
HttpException
public HttpVersion(int major, int minor)
HttpVersionImpl
out of version number parts.
Method Detail |
---|
public static HttpVersion parseVersion(java.lang.String version) throws HttpException
HttpVersion.HTTP10
or HttpVersion.HTTP11
or
a newly constructed HttpVersion
instance.
HttpException
public int getMinorVersion()
public int getMajorVersion()
public java.lang.String toString()
HTTP_VERSION_BEGIN + getMinorVersion() + '.' + getMajorVersion()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |