Class SizeOfPdfStatisticsEvent
- java.lang.Object
-
- com.itextpdf.commons.actions.AbstractITextEvent
-
- com.itextpdf.commons.actions.AbstractProductITextEvent
-
- com.itextpdf.commons.actions.AbstractStatisticsEvent
-
- com.itextpdf.kernel.pdf.statistics.SizeOfPdfStatisticsEvent
-
- All Implemented Interfaces:
IEvent
public class SizeOfPdfStatisticsEvent extends AbstractStatisticsEvent
Class which represents event related to size of the PDF document. Only for internal usage.
-
-
Field Summary
Fields Modifier and Type Field Description private longamountOfBytesprivate static java.lang.StringPDF_SIZE_STATISTICS
-
Constructor Summary
Constructors Constructor Description SizeOfPdfStatisticsEvent(long amountOfBytes, ProductData productData)Creates an instance of this class based on theProductDataand the size of the document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractStatisticsAggregatorcreateStatisticsAggregatorFromName(java.lang.String statisticsName)Creates statistics aggregator based on provided statistics name.longgetAmountOfBytes()Gets number of bytes in the PDF document during the processing of which the event was sent.java.util.List<java.lang.String>getStatisticsNames()Gets all statistics names related to this event.-
Methods inherited from class com.itextpdf.commons.actions.AbstractProductITextEvent
getProductData, getProductName
-
-
-
-
Field Detail
-
PDF_SIZE_STATISTICS
private static final java.lang.String PDF_SIZE_STATISTICS
- See Also:
- Constant Field Values
-
amountOfBytes
private final long amountOfBytes
-
-
Constructor Detail
-
SizeOfPdfStatisticsEvent
public SizeOfPdfStatisticsEvent(long amountOfBytes, ProductData productData)Creates an instance of this class based on theProductDataand the size of the document.- Parameters:
amountOfBytes- the number of bytes in the PDF document during the processing of which the event was sentproductData- is a description of the product which has generated an event
-
-
Method Detail
-
createStatisticsAggregatorFromName
public AbstractStatisticsAggregator createStatisticsAggregatorFromName(java.lang.String statisticsName)
Creates statistics aggregator based on provided statistics name. By default prints log warning and returnsnull.- Overrides:
createStatisticsAggregatorFromNamein classAbstractStatisticsEvent- Parameters:
statisticsName- name of statistics based on which aggregator will be created. Shall be one of those returned fromAbstractStatisticsEvent.getStatisticsNames()- Returns:
- new instance of
AbstractStatisticsAggregator
-
getStatisticsNames
public java.util.List<java.lang.String> getStatisticsNames()
Gets all statistics names related to this event.- Specified by:
getStatisticsNamesin classAbstractStatisticsEvent- Returns:
Listof statistics names
-
getAmountOfBytes
public long getAmountOfBytes()
Gets number of bytes in the PDF document during the processing of which the event was sent.- Returns:
- the number of pages
-
-