List of usage examples for org.apache.pdfbox.cos COSInteger ZERO
COSInteger ZERO
To view the source code for org.apache.pdfbox.cos COSInteger ZERO.
Click Source Link
From source file:org.apache.padaf.preflight.utils.TestCOSUtils.java
License:Apache License
@Test public void testIsInteger() { try {/*from w ww . ja va2s .c om*/ COSObject co = new COSObject(new COSInteger(10)); co.setGenerationNumber(COSInteger.ZERO); co.setObjectNumber(new COSInteger(10)); assertFalse(COSUtils.isInteger(co, new IOCOSDocument())); COSDocument doc = new COSDocument(); addToXref(doc, new COSObjectKey(co), 1000); COSUtils.isInteger(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 testIsFloat() { try {// w w w . ja v a 2 s. c om COSObject co = new COSObject(new COSFloat(10.0f)); co.setGenerationNumber(COSInteger.ZERO); co.setObjectNumber(new COSInteger(10)); assertFalse(COSUtils.isFloat(co, new IOCOSDocument())); COSDocument doc = new COSDocument(); addToXref(doc, new COSObjectKey(co), 1000); COSUtils.isFloat(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 testIsString() { try {// ww w . j ava 2s . com 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 {/*from www . j av a 2s .co m*/ 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 {//from ww w.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.j a v a 2s.c o m 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()); } }