This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import net.sourceforge.tess4j.Tesseract | |
| import net.sourceforge.tess4j.util.PdfUtilities | |
| import java.io.File | |
| import java.util.concurrent.ConcurrentHashMap | |
| import java.util.concurrent.Executors | |
| import java.util.concurrent.TimeUnit | |
| import java.util.concurrent.atomic.AtomicInteger | |
| fun main(args: Array<String>) { | |
| val files = PdfUtilities.convertPdf2Png(File("""D:\git-p\pdf-ocr\src\main\kotlin\11437.pdf""")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sun.reflect.ConstantPool; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.lang.reflect.Method; | |
| import java.lang.reflect.ParameterizedType; | |
| import java.lang.reflect.Type; | |
| import java.util.Objects; | |
| /** | |
| * This approach was inspired by code from @danielbodart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import net.bytebuddy.ByteBuddy; | |
| import net.bytebuddy.agent.ByteBuddyAgent; | |
| import net.bytebuddy.implementation.MethodDelegation; | |
| import org.junit.Test; | |
| import org.mockito.ArgumentMatchers; | |
| import org.mockito.internal.matchers.InstanceOf; | |
| import static java.lang.reflect.Modifier.PUBLIC; | |
| import static java.lang.reflect.Modifier.STATIC; | |
| import static net.bytebuddy.dynamic.loading.ClassReloadingStrategy.fromInstalledAgent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package exploration | |
| import javassist.Modifier.isStatic | |
| import org.junit.Test | |
| import org.reflections.Reflections | |
| import org.reflections.scanners.SubTypesScanner | |
| import java.lang.Exception | |
| import java.lang.reflect.Method | |
| import java.lang.reflect.Modifier.isPrivate | |
| import java.lang.reflect.Modifier.isPublic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org; | |
| import static java.lang.Math.min; | |
| import static java.util.concurrent.TimeUnit.MILLISECONDS; | |
| import java.util.concurrent.ArrayBlockingQueue; | |
| import java.util.concurrent.BlockingQueue; | |
| import java.util.concurrent.TimeUnit; | |
| import java.util.concurrent.locks.LockSupport; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package agh; | |
| public final class MyFinalType implements Processor<String> { | |
| @Override | |
| public final void process(String message) { | |
| }; |