|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.pobjects.Dictionary
org.icepdf.core.pobjects.Stream
public class Stream
The Stream class is responsible for decoding stream contents and returning either an images object or a byte array depending on the content. The Stream object worker method is decode which is responsible for decoding the content stream, which is if the first step of the rendering process. Once a Stream is decoded it is either returned as an image object or a byte array that is then processed further by the ContentParser.
| Field Summary |
|---|
| Fields inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
entries, inited, isDeleted, isNew, library, SUBTYPE_KEY, TYPE_KEY |
| Constructor Summary | |
|---|---|
Stream(Library library,
java.util.Hashtable entries)
Creates a new instance of a Dictionary. |
|
Stream(Library l,
java.util.Hashtable h,
SeekableInputConstrainedWrapper streamInputWrapper)
Create a new instance of a Stream. |
|
| Method Summary | |
|---|---|
void |
dispose(boolean cache)
Despose of references to images and decoded byte streams. |
boolean |
getBlackIs1(Library library,
java.util.Hashtable decodeParmsDictionary)
|
java.lang.Boolean |
getBlackIs1OrNull(Library library,
java.util.Hashtable decodeParmsDictionary)
If BlackIs1 was not specified, then return null, instead of the default value of false, so we can tell if it was given or not |
byte[] |
getBytes()
Gets the decoded Byte stream of the Stream object. |
java.awt.image.BufferedImage |
getImage(java.awt.Color fill,
Resources resources,
boolean allowScaling)
Gets the image object for the given resource. |
java.io.InputStream |
getInputStreamForDecodedStreamBytes()
Utility method for decoding the byte stream using the decode algorithem specified by the filter parameter The memory manger is called every time a stream is being decoded with an estimated size of the decoded stream. |
Reference |
getPObjectReference()
Gets the parent PObject reference for this stream. |
SeekableInputConstrainedWrapper |
getStreamInput()
Allow access to seakable intput so that pattern object can be corrrectly created. |
boolean |
isImageMask()
Does the image have an ImageMask. |
boolean |
isInlineImage()
|
void |
setInlineImage(boolean inlineImage)
Marks this stream as being constructed from an inline image definition in a content stream |
void |
setPObjectReference(Reference reference)
Sets the PObject referece for this stream. |
java.lang.String |
toString()
Return a string description of the object. |
| Methods inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getObject, init, isDeleted, isNew, setDeleted, setNew |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Stream(Library l,
java.util.Hashtable h,
SeekableInputConstrainedWrapper streamInputWrapper)
l - library containing a hash of all document objectsh - hashtable of parameters specific to the Stream object.streamInputWrapper - Accessor to stream byte data
public Stream(Library library,
java.util.Hashtable entries)
library - document library.entries - dictionary entries.| Method Detail |
|---|
public void setPObjectReference(Reference reference)
setPObjectReference in class Dictionaryreference - Reference used to identify this Dictionary in the PDF
document.Dictionary.getPObjectReference()public Reference getPObjectReference()
getPObjectReference in class DictionarysetPObjectReference(org.icepdf.core.pobjects.Reference)public void setInlineImage(boolean inlineImage)
inlineImage - true indicate inline image.public boolean isInlineImage()
public java.io.InputStream getInputStreamForDecodedStreamBytes()
public void dispose(boolean cache)
public byte[] getBytes()
public java.awt.image.BufferedImage getImage(java.awt.Color fill,
Resources resources,
boolean allowScaling)
fill - color value of imageresources - resouces containing image referenceallowScaling - true indicates that the image will be scaled, fals
no scaling.
public boolean isImageMask()
public boolean getBlackIs1(Library library,
java.util.Hashtable decodeParmsDictionary)
public java.lang.Boolean getBlackIs1OrNull(Library library,
java.util.Hashtable decodeParmsDictionary)
public SeekableInputConstrainedWrapper getStreamInput()
public java.lang.String toString()
toString in class Dictionary
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||