@Test public void testApprove() throws Exception { assertTrue(approver.approve(id, "%PDF-1.5".getBytes("utf8"))); assertTrue(approver.approve(id, "%PDF-".getBytes("utf8"))); }
@Override public boolean approve(byte[] data) { if (data == null || data.length < 5) { return false; } return isValidPdfHeader(data); }
PDFHeaderBasedContentApprover implements ContentApprover, IdentifiableContentApprover { @Override public boolean approve(byte[] data) { if (data == null || data.length < 5) { return false; } return isValidPdfHeader(data); } }
PDFHeaderBasedContentApprover implements ContentApprover, IdentifiableContentApprover { @Override public boolean approve(byte[] data) { if (data == null || data.length < 5) { return false; } return isValidPdfHeader(data); }  }
PDFHeaderBasedContentApprover implements ContentApprover, IdentifiableContentApprover { @Override public boolean approve(byte[] data) { if (data == null || data.length < 5) { return false; } return isValidPdfHeader(data); }  @Override boolean approve(byte[] data); @Override boolean approve(String id, byte[] content); }
PDFHeaderBasedContentApprover implements ContentApprover, IdentifiableContentApprover { @Override public boolean approve(byte[] data) { if (data == null || data.length < 5) { return false; } return isValidPdfHeader(data); }  @Override boolean approve(byte[] data); @Override boolean approve(String id, byte[] content);  }