Class MemoryLimitException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.commons.compress.MemoryLimitException
All Implemented Interfaces:
Serializable

public class MemoryLimitException extends 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:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • memoryNeededInKb

      private final long memoryNeededInKb
    • memoryLimitInKb

      private final int memoryLimitInKb
  • Constructor Details

    • MemoryLimitException

      public MemoryLimitException(long memoryNeededInKb, int memoryLimitInKb)
    • MemoryLimitException

      public MemoryLimitException(long memoryNeededInKb, int memoryLimitInKb, Exception e)
  • Method Details

    • getMemoryNeededInKb

      public long getMemoryNeededInKb()
    • getMemoryLimitInKb

      public int getMemoryLimitInKb()
    • buildMessage

      private static String buildMessage(long memoryNeededInKb, int memoryLimitInKb)