/** * This will set the file name. * * @param fileName The name of the file. */ @Override public void setFile( String fileName ) { file = new COSString( fileName ); }
/** * Constructor. * */ public PDSimpleFileSpecification() { file = new COSString( "" ); }
/** * Default constructor. * * @param dest The named destination. */ public PDNamedDestination( String dest ) { namedDestination = new COSString( dest ); }
/** * Set the Perms entry in the encryption dictionary. * * @param perms A 16 byte array. * * @throws IOException If there is an error setting the data. */ public void setPerms(byte[] perms) throws IOException { dictionary.setItem( COSName.PERMS, new COSString(perms) ); }
/** * This will set the javascript code the will get execute before the import. * * @param before A reference to some javascript code. */ public void setBefore(String before) { dictionary.setItem(COSName.BEFORE, new COSString(before)); }
/** * This will set the U entry in the standard encryption dictionary. * * @param u A 32 byte array. * * @throws IOException If there is an error setting the data. */ public void setUserKey(byte[] u) throws IOException { dictionary.setItem(COSName.U, new COSString(u)); }
/** * This will set the UE entry in the standard encryption dictionary. * * @param ue A 32 byte array or null if there is no user encryption key. * * @throws IOException If there is an error setting the data. */ public void setUserEncryptionKey(byte[] ue) throws IOException { dictionary.setItem( COSName.UE, new COSString(ue) ); }
/** * This will set the OE entry in the standard encryption dictionary. * * @param oe A 32 byte array or null if there is no owner encryption key. * * @throws IOException If there is an error setting the data. */ public void setOwnerEncryptionKey(byte[] oe) throws IOException { dictionary.setItem( COSName.OE, new COSString(oe) ); }
/** * This will set the rich text stream which is displayed in the popup window. * * @param rc the rich text stream. */ public final void setRichContents(String rc) { annot.setItem(COSName.RC, new COSString(rc)); }
/** * This will set the javascript code the will get execute after the import. * * @param after A reference to some javascript code. */ public void setAfter(String after) { dictionary.setItem(COSName.AFTER, new COSString(after)); }
/** * This will set the O entry in the standard encryption dictionary. * * @param o A 32 byte array or null if there is no owner key. * * @throws IOException If there is an error setting the data. */ public void setOwnerKey(byte[] o) throws IOException { dictionary.setItem(COSName.O, new COSString(o)); }
/** * This will set the string for an available option. * * @param opt One of the available options. */ public void setOption(String opt) { option.set(0, new COSString(opt)); }
/** * This will set the default appearance string. * * @param da The default appearance string. */ public void setDefaultAppearanceString(String da) { option.set(1, new COSString(da)); } }
/** * This will set the font family. * * @param fontFamily The font family. */ public void setFontFamily( String fontFamily ) { COSString name = null; if( fontFamily != null ) { name = new COSString( fontFamily ); } dic.setItem( COSName.FONT_FAMILY, name ); }
/** * This will set the character set for the font. * * @param charSet The new character set for the font. */ public void setCharacterSet( String charSet ) { COSString name = null; if( charSet != null ) { name = new COSString( charSet ); } dic.setItem( COSName.CHAR_SET, name ); }
/** * Sets the contents. * * @param bytes contents to be used */ public void setContents(byte[] bytes) { COSString string = new COSString(bytes); string.setForceHexForm(true); dictionary.setItem(COSName.CONTENTS, string); }
/** * This will set the rich text stream which is displayed in the popup window. * * @param rc the rich text stream. */ public void setRichContents(String rc) { getCOSObject().setItem(COSName.RC, new COSString(rc)); }
/** * removes an OID from the list * * @param oid */ public void removeOID(byte[] oid) { COSBase base = this.dictionary.getDictionaryObject(COSName.OID); if (base instanceof COSArray) { COSArray array = (COSArray) base; array.remove(new COSString(oid)); } }
/** * removes a subject from the list * * @param subject byte array containing DER-encoded X.509v3 certificate */ public void removeSubject(byte[] subject) { COSBase base = this.dictionary.getDictionaryObject(COSName.SUBJECT); if (base instanceof COSArray) { COSArray array = (COSArray) base; array.remove(new COSString(subject)); } }