List of usage examples for org.apache.pdfbox.cos COSObject setObjectNumber
public void setObjectNumber(long objectNum)
From source file:org.apache.padaf.preflight.utils.TestCOSUtils.java
License:Apache License
@Test public void testIsString() { try {// ww w . j a v a 2 s. c om COSObject co = new COSObject(new COSString("")); co.setGenerationNumber(COSInteger.ZERO); co.setObjectNumber(new COSInteger(10)); assertFalse(COSUtils.isString(co, new IOCOSDocument())); COSDocument doc = new COSDocument(); addToXref(doc, new COSObjectKey(co), 1000); COSUtils.isString(co, doc); doc.close(); } catch (IOException e) { fail(e.getMessage()); } }
From source file:org.apache.padaf.preflight.utils.TestCOSUtils.java
License:Apache License
@Test public void testIsStream() { try {/* w w w .j a v a 2 s . c om*/ COSObject co = new COSObject(new COSStream(null)); co.setGenerationNumber(COSInteger.ZERO); co.setObjectNumber(new COSInteger(10)); assertFalse(COSUtils.isStream(co, new IOCOSDocument())); COSDocument doc = new COSDocument(); addToXref(doc, new COSObjectKey(co), 1000); COSUtils.isStream(co, doc); doc.close(); } catch (IOException e) { fail(e.getMessage()); } }
From source file:org.apache.padaf.preflight.utils.TestCOSUtils.java
License:Apache License
@Test public void testIsDictionary() { try {// w ww .ja va 2 s. c o m COSObject co = new COSObject(new COSDictionary()); co.setGenerationNumber(COSInteger.ZERO); co.setObjectNumber(new COSInteger(10)); assertFalse(COSUtils.isDictionary(co, new IOCOSDocument())); COSDocument doc = new COSDocument(); addToXref(doc, new COSObjectKey(co), 1000); COSUtils.isDictionary(co, doc); doc.close(); } catch (IOException e) { fail(e.getMessage()); } }
From source file:org.apache.padaf.preflight.utils.TestCOSUtils.java
License:Apache License
@Test public void testIsArray() { try {// w ww. ja v a 2s .com COSObject co = new COSObject(new COSArray()); co.setGenerationNumber(COSInteger.ZERO); co.setObjectNumber(new COSInteger(10)); assertFalse(COSUtils.isArray(co, new IOCOSDocument())); COSDocument doc = new COSDocument(); addToXref(doc, new COSObjectKey(co), 1000); COSUtils.isArray(co, doc); doc.close(); } catch (IOException e) { fail(e.getMessage()); } }