From 0af295639d66c0b9aaa3a784307b1ff56b7012f8 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 18 May 2025 23:54:22 +0100 Subject: [PATCH] Update src/test/java/SpyPDFDocumentFactory.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/test/java/SpyPDFDocumentFactory.java | 31 +----------------------- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/test/java/SpyPDFDocumentFactory.java b/src/test/java/SpyPDFDocumentFactory.java index e83f619ba..1252a0f63 100644 --- a/src/test/java/SpyPDFDocumentFactory.java +++ b/src/test/java/SpyPDFDocumentFactory.java @@ -1,30 +1 @@ -import org.apache.pdfbox.io.RandomAccessStreamCache.StreamCacheCreateFunction; - -import stirling.software.SPDF.service.CustomPDFDocumentFactory; -import stirling.software.SPDF.service.PdfMetadataService; - -class SpyPDFDocumentFactory extends CustomPDFDocumentFactory { - enum StrategyType { - MEMORY_ONLY, MIXED, TEMP_FILE - } - - public StrategyType lastStrategyUsed; - - public SpyPDFDocumentFactory(PdfMetadataService service) { - super(service); - } - - @Override - public StreamCacheCreateFunction getStreamCacheFunction(long contentSize) { - StrategyType type; - if (contentSize < 10 * 1024 * 1024) { - type = StrategyType.MEMORY_ONLY; - } else if (contentSize < 50 * 1024 * 1024) { - type = StrategyType.MIXED; - } else { - type = StrategyType.TEMP_FILE; - } - this.lastStrategyUsed = type; - return super.getStreamCacheFunction(contentSize); // delegate to real behavior - } -} \ No newline at end of file +// This file has been removed because SpyPDFDocumentFactory is already implemented in stirling/software/SPDF/service. \ No newline at end of file