com.github.kristofa.test.http
Class HttpResponseImpl

java.lang.Object
  extended by com.github.kristofa.test.http.HttpResponseImpl
All Implemented Interfaces:
HttpResponse

public class HttpResponseImpl
extends Object
implements HttpResponse

HttpResponse implementation.

Author:
kristof

Constructor Summary
HttpResponseImpl(int httpCode, String contentType, byte[] content)
          Creates a new instance.
 
Method Summary
 boolean equals(Object obj)
          
 byte[] getContent()
          Get response content.
 String getContentType()
          Get content type.
 int getHttpCode()
          Gets a HTTP response code.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpResponseImpl

public HttpResponseImpl(int httpCode,
                        String contentType,
                        byte[] content)
Creates a new instance.

Parameters:
httpCode - http response code.
contentType - Content type, can be null.
content - Content, can be null.
Method Detail

getHttpCode

public int getHttpCode()
Gets a HTTP response code.

Specified by:
getHttpCode in interface HttpResponse
Returns:
Gets a HTTP response code.

getContentType

public String getContentType()
Get content type.

Specified by:
getContentType in interface HttpResponse
Returns:
Get content type.

getContent

public byte[] getContent()
Get response content.

Specified by:
getContent in interface HttpResponse
Returns:
Response content.

toString

public String toString()

Overrides:
toString in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object


Copyright © 2014. All Rights Reserved.