use of com.tom_roush.pdfbox.pdmodel.common.COSArrayList in project PdfBox-Android by TomRoush.
the class PDSeedValue method getDigestMethod.
/**
* An array of names indicating acceptable digest algorithms to use when
* signing. The value shall be one of <b>SHA1</b>, <b>SHA256</b>, <b>SHA384</b>,
* <b>SHA512</b>, <b>RIPEMD160</b>. The default value is implementation-specific.
*
* @return the digest method that shall be used by the signature handler
*/
public List<String> getDigestMethod() {
List<String> retval = null;
COSArray fields = (COSArray) dictionary.getDictionaryObject(COSName.DIGEST_METHOD);
if (fields != null) {
List<String> actuals = new ArrayList<String>();
for (int i = 0; i < fields.size(); i++) {
String element = fields.getName(i);
if (element != null) {
actuals.add(element);
}
}
retval = new COSArrayList<String>(actuals, fields);
}
return retval;
}
use of com.tom_roush.pdfbox.pdmodel.common.COSArrayList in project PdfBox-Android by TomRoush.
the class PDSeedValue method getReasons.
/**
* If the Reasons array is provided and {@link #isReasonRequired()} indicates that
* Reasons is a required constraint, one of the reasons in the array shall be used
* for the signature dictionary; otherwise signing shall not take place. If the
* {@link #isReasonRequired()} indicates Reasons is an optional constraint, one of
* the reasons in the array may be chose or a custom reason can be provided.
*
* @return the reasons that should be used by the signature handler
*/
public List<String> getReasons() {
List<String> retval = null;
COSArray fields = (COSArray) dictionary.getDictionaryObject(COSName.REASONS);
if (fields != null) {
List<String> actuals = new ArrayList<String>();
for (int i = 0; i < fields.size(); i++) {
String element = fields.getString(i);
if (element != null) {
actuals.add(element);
}
}
retval = new COSArrayList<String>(actuals, fields);
}
return retval;
}
use of com.tom_roush.pdfbox.pdmodel.common.COSArrayList in project PdfBox-Android by TomRoush.
the class FDFDictionary method getFields.
/**
* This will get the list of FDF Fields. This will return a list of FDFField objects.
*
* @return A list of FDF fields.
*/
public List<FDFField> getFields() {
List<FDFField> retval = null;
COSArray fieldArray = (COSArray) fdf.getDictionaryObject(COSName.FIELDS);
if (fieldArray != null) {
List<FDFField> fields = new ArrayList<FDFField>();
for (int i = 0; i < fieldArray.size(); i++) {
fields.add(new FDFField((COSDictionary) fieldArray.getObject(i)));
}
retval = new COSArrayList<FDFField>(fields, fieldArray);
}
return retval;
}
use of com.tom_roush.pdfbox.pdmodel.common.COSArrayList in project PdfBox-Android by TomRoush.
the class FDFDictionary method getEmbeddedFDFs.
/**
* This will get the list of embedded FDF entries, or null if the entry is null. This will return a list of
* PDFileSpecification objects.
*
* @return A list of embedded FDF files.
*
* @throws IOException If there is an error creating the file spec.
*/
public List<PDFileSpecification> getEmbeddedFDFs() throws IOException {
List<PDFileSpecification> retval = null;
COSArray embeddedArray = (COSArray) fdf.getDictionaryObject(COSName.EMBEDDED_FDFS);
if (embeddedArray != null) {
List<PDFileSpecification> embedded = new ArrayList<PDFileSpecification>();
for (int i = 0; i < embeddedArray.size(); i++) {
embedded.add(PDFileSpecification.createFS(embeddedArray.get(i)));
}
retval = new COSArrayList<PDFileSpecification>(embedded, embeddedArray);
}
return retval;
}
use of com.tom_roush.pdfbox.pdmodel.common.COSArrayList in project PdfBox-Android by TomRoush.
the class FDFDictionary method getAnnotations.
/**
* This will get the list of FDF Annotations. This will return a list of FDFAnnotation objects or null if the entry
* is not set.
*
* @return A list of FDF annotations.
*
* @throws IOException If there is an error creating the annotation list.
*/
public List<FDFAnnotation> getAnnotations() throws IOException {
List<FDFAnnotation> retval = null;
COSArray annotArray = (COSArray) fdf.getDictionaryObject(COSName.ANNOTS);
if (annotArray != null) {
List<FDFAnnotation> annots = new ArrayList<FDFAnnotation>();
for (int i = 0; i < annotArray.size(); i++) {
annots.add(FDFAnnotation.create((COSDictionary) annotArray.getObject(i)));
}
retval = new COSArrayList<FDFAnnotation>(annots, annotArray);
}
return retval;
}
Aggregations