mirror of https://github.com/apache/poi.git
add extra max size config
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898234 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
189552425d
commit
9563aa92da
|
@ -86,10 +86,16 @@ public class TSPTimeStampService implements TimeStampService {
|
|||
private static final int DEFAULT_TIMESTAMP_RESPONSE_SIZE = 10_000_000;
|
||||
private static int MAX_TIMESTAMP_RESPONSE_SIZE = DEFAULT_TIMESTAMP_RESPONSE_SIZE;
|
||||
|
||||
/**
|
||||
* @param maxTimestampResponseSize the max timestamp response size allowed
|
||||
*/
|
||||
public static void setMaxTimestampResponseSize(int maxTimestampResponseSize) {
|
||||
MAX_TIMESTAMP_RESPONSE_SIZE = maxTimestampResponseSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the max timestamp response size allowed
|
||||
*/
|
||||
public static int getMaxTimestampResponseSize() {
|
||||
return MAX_TIMESTAMP_RESPONSE_SIZE;
|
||||
}
|
||||
|
|
|
@ -572,7 +572,7 @@ public class XMLSlideShow extends POIXMLDocument
|
|||
*/
|
||||
@Override
|
||||
public XSLFPictureData addPicture(InputStream is, PictureType format) throws IOException {
|
||||
return addPicture(IOUtils.toByteArray(is, MAX_IMAGE_SIZE), format);
|
||||
return addPicture(IOUtils.toByteArray(is, getMaxImageSize()), format);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue