public class MemoryLimitsAwareHandler extends Object implements Serializable
MemoryLimitsAwareHandler
handles memory allocation and prevents decompressed pdf streams from occupation of more space than allowed.
Constructor and Description |
---|
MemoryLimitsAwareHandler()
Creates a MemoryLimitsAwareHandler which will be used to handle decompression of pdf streams.
|
MemoryLimitsAwareHandler(long documentSize)
Creates a MemoryLimitsAwareHandler which will be used to handle decompression of pdf streams.
|
Modifier and Type | Method and Description |
---|---|
long |
getMaxSizeOfDecompressedPdfStreamsSum()
Gets the maximum allowed size which can be occupied by all decompressed pdf streams.
|
int |
getMaxSizeOfSingleDecompressedPdfStream()
Gets the maximum allowed size which can be occupied by a single decompressed pdf stream.
|
MemoryLimitsAwareHandler |
setMaxSizeOfDecompressedPdfStreamsSum(long maxSizeOfDecompressedPdfStreamsSum)
Sets the maximum allowed size which can be occupied by all decompressed pdf streams.
|
MemoryLimitsAwareHandler |
setMaxSizeOfSingleDecompressedPdfStream(int maxSizeOfSingleDecompressedPdfStream)
Sets the maximum allowed size which can be occupied by a single decompressed pdf stream.
|
public MemoryLimitsAwareHandler()
MemoryLimitsAwareHandler
which will be used to handle decompression of pdf streams. The max allowed memory limits will be generated by default.
public MemoryLimitsAwareHandler(long documentSize)
MemoryLimitsAwareHandler
which will be used to handle decompression of pdf streams. The max allowed memory limits will be generated by default, based on the size of the document.
documentSize
- the size of the document, which is going to be handled by iText.
public int getMaxSizeOfSingleDecompressedPdfStream()
public MemoryLimitsAwareHandler setMaxSizeOfSingleDecompressedPdfStream(int maxSizeOfSingleDecompressedPdfStream)
maxSizeOfSingleDecompressedPdfStream
- the maximum allowed size which can be occupied by a single decompressed pdf stream.
MemoryLimitsAwareHandler
instance.
public long getMaxSizeOfDecompressedPdfStreamsSum()
public MemoryLimitsAwareHandler setMaxSizeOfDecompressedPdfStreamsSum(long maxSizeOfDecompressedPdfStreamsSum)
maxSizeOfDecompressedPdfStreamsSum
- he maximum allowed size which can be occupied by all decompressed pdf streams.
MemoryLimitsAwareHandler
instance.
Copyright © 1998–2020 iText Group NV. All rights reserved.