Package eu.europa.esig.dss.pdf
Interface PdfDict
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new raw input stream.getAsArray
(String name) Gets the pdfArray by nameGets an embedded dictionary by namebyte[]
getBinariesValue
(String name) Gets binaries by dictionary namegetDateValue
(String name) Gets a dategetNameValue
(String name) Gets a name of the dictionarygetNumberValue
(String name) Returns a number valueReturns a PDF objectgetObjectNumber
(String name) Returns a number of indirect reference to an object, when applicablelong
Returns a size of the raw stream, if presentbyte[]
Returns object's stream binaries, when availablegetStringValue
(String name) Gets a string value by property nameString[]
list()
Lists all encapsulated dictionary namesboolean
This method verifies if the content of thepdfDict
matches the corresponding attributes of the current dictionary.void
setDirect
(boolean direct) Sets whether the object shall be written directly to its parentvoid
setIntegerValue
(String key, Integer value) Sets the Integervalue
with the givenkey
void
setNameValue
(String key, String value) Sets the Namevalue
with the givenkey
void
setPdfObjectValue
(String key, PdfObject pdfObject) Sets the DictionarypdfObject
with the givenkey
void
setStringValue
(String key, String value) Sets the Stringvalue
with the givenkey
-
Method Details
-
getAsDict
-
getAsArray
-
getBinariesValue
Gets binaries by dictionary name- Parameters:
name
-String
- Returns:
- byte array
- Throws:
IOException
- if an exception occurs
-
list
-
getStringValue
-
getNameValue
-
getDateValue
-
getNumberValue
-
getObject
-
getObjectNumber
-
getStreamBytes
Returns object's stream binaries, when available- Returns:
- byte array
- Throws:
IOException
- if a stream reading exception occurs
-
createRawInputStream
Creates a new raw input stream. NOTE: contains raw and not encoded data.- Returns:
InputStream
- Throws:
IOException
- if a stream reading exception occurs
-
getRawStreamSize
Returns a size of the raw stream, if present- Returns:
- size of the raw stream, -1 if not applicable
- Throws:
IOException
- if a stream reading exception occurs
-
setPdfObjectValue
-
setNameValue
-
setStringValue
-
setIntegerValue
-
setDirect
void setDirect(boolean direct) Sets whether the object shall be written directly to its parent- Parameters:
direct
- whether the object shall be written directly
-
match
This method verifies if the content of thepdfDict
matches the corresponding attributes of the current dictionary. NOTE: this method is different from#equals
, as it does not ensure full equality.- Parameters:
pdfDict
-PdfDict
to compare- Returns:
- TRUE if the content of pdfDict matches, FALSE otherwise
-