Package net.anwiba.commons.http
Class HttpRequestException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- net.anwiba.commons.http.HttpRequestException
-
- All Implemented Interfaces:
java.io.Serializable
public class HttpRequestException extends java.io.IOException- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HttpRequestException(java.lang.String message, java.lang.String url, int statusCode, java.lang.String statusText, byte[] content, java.lang.String contentType, java.lang.String contentEncoding)HttpRequestException(java.lang.String message, java.lang.String url, int statusCode, java.lang.String statusText, byte[] content, java.lang.String contentType, java.lang.String contentEncoding, java.lang.Throwable throwable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpRequestExceptioncreate(java.lang.String message, IResponse response)static HttpRequestExceptioncreate(java.lang.String message, IResponse response, byte[] body)byte[]getContent()java.lang.StringgetContentAsString()java.lang.StringgetContentEncoding()intgetContentLength()java.lang.StringgetContentType()intgetStatusCode()java.lang.StringgetStatusText()java.lang.StringgetUrl()
-
-
-
Constructor Detail
-
HttpRequestException
public HttpRequestException(java.lang.String message, java.lang.String url, int statusCode, java.lang.String statusText, byte[] content, java.lang.String contentType, java.lang.String contentEncoding)
-
HttpRequestException
public HttpRequestException(java.lang.String message, java.lang.String url, int statusCode, java.lang.String statusText, byte[] content, java.lang.String contentType, java.lang.String contentEncoding, java.lang.Throwable throwable)
-
-
Method Detail
-
getUrl
public java.lang.String getUrl()
-
getContent
public byte[] getContent()
-
getContentLength
public int getContentLength()
-
getContentAsString
public java.lang.String getContentAsString()
-
getContentType
public java.lang.String getContentType()
-
getContentEncoding
public java.lang.String getContentEncoding()
-
getStatusCode
public int getStatusCode()
-
getStatusText
public java.lang.String getStatusText()
-
create
public static HttpRequestException create(java.lang.String message, IResponse response, byte[] body)
-
create
public static HttpRequestException create(java.lang.String message, IResponse response) throws java.io.IOException
- Throws:
java.io.IOException
-
-