Package org.apache.commons.compress
Class MemoryLimitException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.apache.commons.compress.MemoryLimitException
-
- All Implemented Interfaces:
java.io.Serializable
public class MemoryLimitException extends java.io.IOException
If a stream checks for estimated memory allocation, and the estimate goes above the memory limit, this is thrown. This can also be thrown if a stream tries to allocate a byte array that is larger than the allowable limit.- Since:
- 1.14
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private int
memoryLimitInKb
private long
memoryNeededInKb
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description MemoryLimitException(long memoryNeededInKb, int memoryLimitInKb)
MemoryLimitException(long memoryNeededInKb, int memoryLimitInKb, java.lang.Exception e)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
buildMessage(long memoryNeededInKb, int memoryLimitInKb)
int
getMemoryLimitInKb()
long
getMemoryNeededInKb()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
memoryNeededInKb
private final long memoryNeededInKb
-
memoryLimitInKb
private final int memoryLimitInKb
-
-