Android APIs
public class

BasicStatusLine

extends Object
implements Cloneable StatusLine
java.lang.Object
   ↳ org.apache.http.message.BasicStatusLine

Class Overview

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

See Also

Summary

Public Constructors
BasicStatusLine(ProtocolVersion version, int statusCode, String reasonPhrase)
Creates a new status line with the given version, status, and reason.
Public Methods
Object clone()
Creates and returns a copy of this Object.
ProtocolVersion getProtocolVersion()
String getReasonPhrase()
int getStatusCode()
String toString()
Returns a string containing a concise, human-readable description of this object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.StatusLine

Public Constructors

public BasicStatusLine (ProtocolVersion version, int statusCode, String reasonPhrase)

Added in API level 1

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

Public Methods

public Object clone ()

Added in API level 1

Creates and returns a copy of this Object. The default implementation returns a so-called "shallow" copy: It creates a new instance of the same class and then copies the field values (including object references) from this instance to the new instance. A "deep" copy, in contrast, would also recursively clone nested objects. A subclass that needs to implement this kind of cloning should call super.clone() to create the new instance and then create deep copies of the nested, mutable objects.

Returns
  • a copy of this object.

public ProtocolVersion getProtocolVersion ()

Added in API level 1

Returns
  • the HTTP-Version

public String getReasonPhrase ()

Added in API level 1

Returns
  • the Reason-Phrase

public int getStatusCode ()

Added in API level 1

Returns
  • the Status-Code

public String toString ()

Added in API level 1

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

   getClass().getName() + '@' + Integer.toHexString(hashCode())

See Writing a useful toString method if you intend implementing your own toString method.

Returns
  • a printable representation of this object.