-
public class PdfRendererCore.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanenableDebugMetricsprivate final IntegerprefetchDistancepublic final static PdfRendererCore.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final PdfRendererCorecreate(Context context, ParcelFileDescriptor fileDescriptor, String cacheIdentifier, CacheStrategy cacheStrategy)Creates a PdfRendererCore instance from an already-opened fileDescriptor. final ParcelFileDescriptorgetFileDescriptor(File file)final StringgetCacheIdentifierFromFile(File file)final BooleangetEnableDebugMetrics()final UnitsetEnableDebugMetrics(Boolean enableDebugMetrics)final IntegergetPrefetchDistance()-
-
Method Detail
-
create
final PdfRendererCore create(Context context, ParcelFileDescriptor fileDescriptor, String cacheIdentifier, CacheStrategy cacheStrategy)
Creates a PdfRendererCore instance from an already-opened fileDescriptor.
Ownership contract: on success the returned PdfRendererCore owns both the fileDescriptor and the native PdfRenderer, closing them when closePdfRender is called. On failure (i.e. this function throws) all partially-initialised resources — including the native PdfRenderer — are closed before the exception propagates. The fileDescriptor is not closed on failure; the caller is responsible for closing it in its error path.
-
getFileDescriptor
final ParcelFileDescriptor getFileDescriptor(File file)
-
getCacheIdentifierFromFile
@Deprecated(message = Use CacheHelper.getCacheKey(file.absolutePath) directly., replaceWith = @ReplaceWith(imports = {com.rajat.pdfviewer.util.CacheHelper}, expression = CacheHelper.getCacheKey(file.absolutePath))) final String getCacheIdentifierFromFile(File file)
-
getEnableDebugMetrics
final Boolean getEnableDebugMetrics()
-
setEnableDebugMetrics
final Unit setEnableDebugMetrics(Boolean enableDebugMetrics)
-
getPrefetchDistance
final Integer getPrefetchDistance()
-
-
-
-