/** * Returns the entry as an appearance stream. * * @throws IllegalStateException if this entry is not an appearance stream */ public PDAppearanceStream getAppearanceStream() { if (!isStream()) { throw new IllegalStateException("This entry is not an appearance stream"); } return new PDAppearanceStream((COSStream) entry); }
/** * Returns the entry as an appearance stream. * * @throws IllegalStateException if this entry is not an appearance stream */ public PDAppearanceStream getAppearanceStream() { if (!isStream()) { throw new IllegalStateException(); } return new PDAppearanceStream((COSStream) entry); }
/** * Returns the entry as an appearance stream. * * @throws IllegalStateException if this entry is not an appearance stream */ public PDAppearanceStream getAppearanceStream() { if (!isStream()) { throw new IllegalStateException(); } return new PDAppearanceStream((COSStream) entry); }
if (appearance != null && appearance.isStream())
private static void addAllAppearances(PDAppearanceEntry appearance, List<PDAppearanceStream> list) { if (appearance == null) { return; } if (appearance.isStream()) { PDAppearanceStream appearanceStream = appearance.getAppearanceStream(); if (appearanceStream != null) { list.add(appearanceStream); } } else { for (PDAppearanceStream appearanceStream : appearance.getSubDictionary().values()) { if (appearanceStream != null) { list.add(appearanceStream); } } } }
private Set<String> getAppearanceEntryDependencies(PDAppearanceEntry entry, COSBase entryLink) { Set<String> res = new HashSet<>(); if (entry.isStream()) { res.add(getAppearanceStreamDependencies(entry.getAppearanceStream(), entryLink)); } else { for (Map.Entry<COSName, PDAppearanceStream> mapEntry : entry.getSubDictionary().entrySet()) { res.add(getAppearanceStreamDependencies(mapEntry.getValue(), ((COSDictionary) entry.getCOSObject()).getItem(mapEntry.getKey()))); } } return res; }
private void addContentStreamsFromAppearanceEntry(COSBase appearanceEntry, List<PDContentStream> appearances) { if (appearanceEntry != null) { PDAppearanceEntry newAppearance = new PDAppearanceEntry(appearanceEntry); if (newAppearance.isStream()) { addAppearance(appearances, newAppearance.getAppearanceStream()); } else { Map<COSName, PDAppearanceStream> subDictionary = newAppearance.getSubDictionary(); for (PDAppearanceStream stream : subDictionary.values()) { addAppearance(appearances, stream); } } } }
if (appearance != null && appearance.isStream())
if (appearance != null && appearance.isStream())