Package org.apache.fop.pdf
Class PDFNumsArray
java.lang.Object
org.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFNumsArray
- All Implemented Interfaces:
PDFWritable
Class representing an "Nums" array object (for Number Trees).
-
Field Summary
Modifier and TypeFieldDescriptionSorted Map holding the values of this array. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget
(int key) Gets an entry.Gets an entry.int
length()
Returns the length of the arrayint
output
(OutputStream stream) Write the PDF represention of this objectvoid
Sets an entry.void
Sets an entry.Methods inherited from class org.apache.fop.pdf.PDFObject
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getChildren, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDF, toPDFString
-
Field Details
-
map
Sorted Map holding the values of this array.
-
-
Constructor Details
-
PDFNumsArray
Create a new, empty array object.- Parameters:
parent
- the object's parent if any
-
-
Method Details
-
length
public int length()Returns the length of the array- Returns:
- the length of the array
-
put
Sets an entry.- Parameters:
key
- the key of the value to setobj
- the new value
-
put
Sets an entry.- Parameters:
key
- the key of the value to setobj
- the new value
-
get
Gets an entry.- Parameters:
key
- the key of requested value- Returns:
- the requested value
-
get
Gets an entry.- Parameters:
key
- the key of requested value- Returns:
- the requested value
-
output
Write the PDF represention of this object- Overrides:
output
in classPDFObject
- Parameters:
stream
- the stream to write the PDF to- Returns:
- the number of bytes written
- Throws:
IOException
- if there is an error writing to the stream
-