/** * This is a convenience method that will get the dictionary object that is expected to be a name * and convert it to a string. Null is returned if the entry does not exist in the dictionary. * * @param key The key to the item in the dictionary. * @return The name converted to a string. * @throws IOException If there is an error converting to a date. */ public Calendar getDate(COSName key) throws IOException { COSString date = (COSString) getDictionaryObject(key); return DateConverter.toCalendar(date); }
/** * Set the date object. * * @param key The key to the date. * @param date The date to set. */ public void setDate(COSName key, Calendar date) { setString(key, DateConverter.toString(date)); }