Build 1.0_r1(from source)

org.apache.http.message
Class BasicStatusLine

java.lang.Object
  extended by org.apache.http.message.BasicStatusLine
All Implemented Interfaces:
Cloneable, StatusLine

public class BasicStatusLine
extends Object
implements StatusLine, Cloneable

Represents a status line as returned from a HTTP server. See RFC2616 section 6.1. This class is immutable and therefore inherently thread safe.

Since:
4.0
See Also:
HttpStatus

Constructor Summary
BasicStatusLine(ProtocolVersion version, int statusCode, String reasonPhrase)
          Creates a new status line with the given version, status, and reason.
 
Method Summary
 Object clone()
          Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
 ProtocolVersion getProtocolVersion()
           
 String getReasonPhrase()
           
 int getStatusCode()
           
 String toString()
          Returns a string containing a concise, human-readable description of the receiver.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicStatusLine

public BasicStatusLine(ProtocolVersion version,
                       int statusCode,
                       String reasonPhrase)
Creates a new status line with the given version, status, and reason.

Parameters:
version - the protocol version of the response
statusCode - the status code of the response
reasonPhrase - the reason phrase to the status code, or null
Method Detail

getStatusCode

public int getStatusCode()
Specified by:
getStatusCode in interface StatusLine
Returns:
the Status-Code

getProtocolVersion

public ProtocolVersion getProtocolVersion()
Specified by:
getProtocolVersion in interface StatusLine
Returns:
the HTTP-Version

getReasonPhrase

public String getReasonPhrase()
Specified by:
getReasonPhrase in interface StatusLine
Returns:
the Reason-Phrase

toString

public String toString()
Description copied from class: Object
Returns a string containing a concise, human-readable description of the receiver.

Overrides:
toString in class Object
Returns:
String a printable representation for the receiver.

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from class: Object
Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.

Classes which wish to support cloning must specify that they implement the Cloneable interface, since the implementation checks for this.

Overrides:
clone in class Object
Returns:
Object a shallow copy of this object.
Throws:
CloneNotSupportedException - if the receiver's class does not implement the interface Cloneable.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature