Class Stream
java.lang.Object
com.orsonpdf.PDFObject
com.orsonpdf.Stream
- Direct Known Subclasses:
GraphicsStream, PDFImage, PDFSoftMaskImage
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a filter to the stream.protected DictionarycreateDictionary(int streamLength) Creates the dictionary for this stream object.byte[]Returns the PDF bytes for this stream object, with all current filters applied.abstract byte[]Returns the raw data for the stream.voidRemoves any filters that were previously added.Methods inherited from class PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
Field Details
-
filters
-
-
Constructor Details
-
Stream
Stream(int number) Creates a new stream.- Parameters:
number- the PDF object number.
-
-
Method Details
-
addFilter
Adds a filter to the stream.- Parameters:
f- the filter (nullnot permitted).- See Also:
-
removeFilters
public void removeFilters()Removes any filters that were previously added.- See Also:
-
getObjectBytes
Returns the PDF bytes for this stream object, with all current filters applied.- Specified by:
getObjectBytesin classPDFObject- Returns:
- The PDF bytes for this stream object.
- Throws:
IOException- if there is a problem writing to the byte array.
-
createDictionary
Creates the dictionary for this stream object. The dictionary will be populated with the stream length and the decode values for any filters that are currently applied.- Parameters:
streamLength- the stream length.- Returns:
- The dictionary.
-
getRawStreamData
public abstract byte[] getRawStreamData()Returns the raw data for the stream.- Returns:
- The raw data for the stream.
-