protected boolean matches ( PDF pdf ) { try ( InputStream inStream = pdf . openStream ( ) ) { final PDDocument doc = PDDocument . load ( inStream ) ; return matchesPDF ( doc ) ; } catch ( IOException e ) { LOG . debug ( "Could not load PDF document" , e ) ; return false ; } }
Is invoked by the matches method when the type of the target object is verified . Override this method to add verifications on the raw data instead of a loaded document .