public void setIntegerKey(final ASAtom key, final Long value) { object.setIntegerKey(key, value); }
public boolean setIntegerKey(final ASAtom key, final long value) { getDirect().setIntegerKey(key, value); return true; }
private void incLeafCount() { PDPageTreeBranch branch = this; while (branch != null) { ++branch.leafCount; branch.getObject().setIntegerKey(ASAtom.COUNT, branch.leafCount); branch = branch.getParent(); } }
public void setPrev(final Long prev) { if (prev != 0) { getObject().setIntegerKey(ASAtom.PREV, prev); } else { removeKey(ASAtom.PREV); } }
public PDICCBased(int numberOfComponents, byte[] profile) { ASInputStream iccProfileStream = new ASMemoryInStream(profile); COSObject cosObject = COSStream.construct(iccProfileStream); cosObject.setIntegerKey(ASAtom.N, numberOfComponents); setObject(cosObject); this.iccProfile = new ICCProfile(cosObject); Long n = this.iccProfile.getNumberOfColorants(); this.numberOfComponents = n == null ? -1 : n.intValue(); }
private void initialize() { COSObject dict = COSDictionary.construct(); dict.setNameKey(ASAtom.TYPE, ASAtom.PAGES); dict.setArrayKey(ASAtom.KIDS); dict.setIntegerKey(ASAtom.COUNT, 0); COSObject branch = COSIndirect.construct(dict); setObject(branch); }
public void setSize(final Long size) { if (getPrev() != null && getPrev() != 0) { final Long prevSize = getObject().getIntegerKey(ASAtom.SIZE); if (prevSize > size) { return; } } getObject().setIntegerKey(ASAtom.SIZE, size); }
public PDCatalog getCatalog() { if (!catalog.empty() || document == null) { return catalog; } COSObject root = document.getTrailer().getRoot(); if (root == COSObject.getEmpty()) { root = new COSObject(); document.getTrailer().setRoot(root); } if (!root.empty()) { catalog.setObject(root); return catalog; } root.setNameKey(ASAtom.TYPE, ASAtom.CATALOG); COSObject pages = new COSObject(); pages.setNameKey(ASAtom.TYPE, ASAtom.PAGES); pages.setArrayKey(ASAtom.KIDS); pages.setIntegerKey(ASAtom.COUNT, 0); pages = COSIndirect.construct(root, document); root.setKey(ASAtom.PAGES, pages); root = COSIndirect.construct(root, document); document.getTrailer().setRoot(root); catalog.setObject(root); return catalog; }