Class AllocationRequestException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.commons.imaging.ImagingRuntimeException
-
- org.apache.commons.imaging.common.AllocationRequestException
-
- All Implemented Interfaces:
java.io.Serializable
public class AllocationRequestException extends ImagingRuntimeException
Thrown when an allocation request is too large.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private intlimitprivate java.math.BigIntegerrequestprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description AllocationRequestException(int limit, int request)Constructs a new instance.AllocationRequestException(int limit, long request, java.lang.Throwable throwable)Constructs a new instance.AllocationRequestException(int limit, java.math.BigInteger request)Constructs a new instance.AllocationRequestException(int limit, java.math.BigInteger request, java.lang.Throwable throwable)Constructs a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.Stringformat(int limit, java.math.BigInteger request)intgetLimit()Gets the allocation limit.java.math.BigIntegergetRequest()Gets the allocation request.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
limit
private final int limit
-
request
private final java.math.BigInteger request
-
-
Constructor Detail
-
AllocationRequestException
public AllocationRequestException(int limit, java.math.BigInteger request)Constructs a new instance.- Parameters:
limit- The allocation limit.request- The allocation request.
-
AllocationRequestException
public AllocationRequestException(int limit, java.math.BigInteger request, java.lang.Throwable throwable)Constructs a new instance.- Parameters:
limit- The allocation limit.request- The allocation request.throwable- the cause (which is saved for later retrieval by theThrowable.getCause()method). (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)
-
AllocationRequestException
public AllocationRequestException(int limit, int request)Constructs a new instance.- Parameters:
limit- The allocation limit.request- The allocation request.
-
AllocationRequestException
public AllocationRequestException(int limit, long request, java.lang.Throwable throwable)Constructs a new instance.- Parameters:
limit- The allocation limit.request- The allocation request.throwable- the cause (which is saved for later retrieval by theThrowable.getCause()method). (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)
-
-
Method Detail
-
format
private static java.lang.String format(int limit, java.math.BigInteger request)
-
getLimit
public int getLimit()
Gets the allocation limit.- Returns:
- the allocation limit.
-
getRequest
public java.math.BigInteger getRequest()
Gets the allocation request.- Returns:
- the allocation request.
-
-