Top Description Fields Constructors Methods
org.apache.commons.compress

public Class MemoryLimitException

extends IOException
Class Inheritance
Imports
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

Field Summary

Modifier and TypeField and Description
private final int
private final long
memoryNeededInKb

A long instead of int to account for overflow for corrupt files.

private static final long

Constructor Summary

AccessConstructor and Description
public
MemoryLimitException(final long memoryNeededInKb, final int memoryLimitInKb)

public
MemoryLimitException(final long memoryNeededInKb, final int memoryLimitInKb, final Exception e)

Method Summary

Modifier and TypeMethod and Description
private static String
buildMessage(final long memoryNeededInKb, final int memoryLimitInKb)

public int
public long

Field Detail

memoryLimitInKbback to summary
private final int memoryLimitInKb
memoryNeededInKbback to summary
private final long memoryNeededInKb

A long instead of int to account for overflow for corrupt files.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.io.IOException.serialVersionUID.

Constructor Detail

MemoryLimitExceptionback to summary
public MemoryLimitException(final long memoryNeededInKb, final int memoryLimitInKb)
MemoryLimitExceptionback to summary
public MemoryLimitException(final long memoryNeededInKb, final int memoryLimitInKb, final Exception e)

Method Detail

buildMessageback to summary
private static String buildMessage(final long memoryNeededInKb, final int memoryLimitInKb)
getMemoryLimitInKbback to summary
public int getMemoryLimitInKb()
getMemoryNeededInKbback to summary
public long getMemoryNeededInKb()