Package de.uplanet.net.http
Class HttpRangeNotSatisfiableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.uplanet.net.http.HttpErrorException
de.uplanet.net.http.HttpClientErrorException
de.uplanet.net.http.HttpRangeNotSatisfiableException
- All Implemented Interfaces:
Serializable
@ResponseStatus(REQUESTED_RANGE_NOT_SATISFIABLE)
public final class HttpRangeNotSatisfiableException
extends HttpClientErrorException
This exception corresponds to the HTTP 416 status code.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpRangeNotSatisfiableException(long p_lResourceLength) Create a HTTP exception with the status code416 Range Not Satisfiable.HttpRangeNotSatisfiableException(String p_strMessage, long p_lResourceLength) Create a HTTP exception with the status code416 Range Not Satisfiable.HttpRangeNotSatisfiableException(String p_strMessage, Throwable p_cause, long p_lResourceLength) Create a HTTP exception with the status code416 Range Not Satisfiable.HttpRangeNotSatisfiableException(Throwable p_cause, long p_lResourceLength) Create a HTTP exception with the status code416 Range Not Satisfiable. -
Method Summary
Modifier and TypeMethodDescriptionlongGet the current length of the requested resource.intGet the HTTP status associated with this error.Methods inherited from class de.uplanet.net.http.HttpErrorException
getStatusMessageMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpRangeNotSatisfiableException
public HttpRangeNotSatisfiableException(long p_lResourceLength) Create a HTTP exception with the status code416 Range Not Satisfiable.- Parameters:
p_lResourceLength- The current length of the resource.
-
HttpRangeNotSatisfiableException
Create a HTTP exception with the status code416 Range Not Satisfiable.- Parameters:
p_strMessage- An error message that can be later retrieved by theThrowable.getMessage()method.p_lResourceLength- The current length of the resource.
-
HttpRangeNotSatisfiableException
Create a HTTP exception with the status code416 Range Not Satisfiable.- Parameters:
p_cause- The cause that can be later retrieved by theThrowable.getCause()method.p_lResourceLength- The current length of the resource.
-
HttpRangeNotSatisfiableException
public HttpRangeNotSatisfiableException(String p_strMessage, Throwable p_cause, long p_lResourceLength) Create a HTTP exception with the status code416 Range Not Satisfiable.- Parameters:
p_strMessage- An error message that can be later retrieved by theThrowable.getMessage()method.p_cause- The cause that can be later retrieved by theThrowable.getCause()method.p_lResourceLength- The current length of the resource.
-
-
Method Details
-
getStatus
public int getStatus()Description copied from class:HttpErrorExceptionGet the HTTP status associated with this error.- Overrides:
getStatusin classHttpErrorException- Returns:
- The HTTP status code
416 Range Not Satisfiable.
-
getResourceLength
public long getResourceLength()Get the current length of the requested resource.- Returns:
- The current length of the requested resource.
-