Package de.redsix.pdfcompare
Class Utilities
java.lang.Object
de.redsix.pdfcompare.Utilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidawait(CountDownLatch latch, String latchName, Environment environment) static ExecutorServiceblockingExecutor(String name, int coreThreads, int maxThreads, int queueCapacity, Environment environment) static ExecutorServiceblockingExecutor(String name, int threads, int queueCapacity, Environment environment) static org.apache.pdfbox.io.RandomAccessStreamCache.StreamCacheCreateFunctiongetMemorySettings(int bytes) static intgetNumberOfPages(Path document, Environment environment) static ImageWithDimensionrenderPage(InputStream documentIS, int page, Environment environment) static ImageWithDimensionrenderPage(Path document, int page, Environment environment) static voidshutdownAndAwaitTermination(ExecutorService executor, String executorName)
-
Constructor Details
-
Utilities
public Utilities()
-
-
Method Details
-
getMemorySettings
public static org.apache.pdfbox.io.RandomAccessStreamCache.StreamCacheCreateFunction getMemorySettings(int bytes) throws IOException - Throws:
IOException
-
blockingExecutor
public static ExecutorService blockingExecutor(String name, int coreThreads, int maxThreads, int queueCapacity, Environment environment) -
blockingExecutor
public static ExecutorService blockingExecutor(String name, int threads, int queueCapacity, Environment environment) -
shutdownAndAwaitTermination
-
await
-
getNumberOfPages
- Throws:
IOException
-
renderPage
public static ImageWithDimension renderPage(Path document, int page, Environment environment) throws IOException - Throws:
IOException
-
renderPage
public static ImageWithDimension renderPage(InputStream documentIS, int page, Environment environment) throws IOException - Throws:
IOException
-