|
|||||||||
| 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 | |
|---|---|
static Name |
COLORSPACE_KEY
|
protected boolean |
compressed
|
static Name |
CS_KEY
|
static Name |
DECODEPARAM_KEY
|
static Name |
F_KEY
|
static Name |
FILTER_KEY
|
static Name |
H_KEY
|
static Name |
HEIGHT_KEY
|
static Name |
I_KEY
|
static Name |
IM_KEY
|
static Name |
IMAGEMASK_KEY
|
static Name |
INDEXED_KEY
|
protected Reference |
pObjectReference
|
protected byte[] |
rawBytes
|
static Name |
W_KEY
|
static Name |
WIDTH_KEY
|
| Fields inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY |
| Constructor Summary | |
|---|---|
Stream(Library l,
java.util.HashMap h,
byte[] rawBytes)
|
|
Stream(Library l,
java.util.HashMap h,
SeekableInputConstrainedWrapper streamInputWrapper)
Create a new instance of a Stream. |
|
| Method Summary | |
|---|---|
java.io.ByteArrayInputStream |
getDecodedByteArrayInputStream()
Gets the decoded Byte stream of the Stream object. |
byte[] |
getDecodedStreamBytes()
|
byte[] |
getDecodedStreamBytes(int presize)
This is similar to getDecodedStreamByteArray(), except that the returned byte[] is not necessarily exactly sized, and may be larger. |
protected java.util.List<java.lang.String> |
getFilterNames()
|
protected java.util.List<java.lang.String> |
getNormalisedFilterNames()
|
Reference |
getPObjectReference()
Gets the parent PObject reference for this stream. |
byte[] |
getRawBytes()
|
protected boolean |
isImageSubtype()
|
boolean |
isRawBytesCompressed()
|
void |
setPObjectReference(Reference reference)
Sets the PObject referece for this stream. |
void |
setRawBytes(byte[] rawBytes)
|
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, init, isDeleted, isNew, setDeleted, setNew |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Name WIDTH_KEY
public static final Name W_KEY
public static final Name HEIGHT_KEY
public static final Name H_KEY
public static final Name IMAGEMASK_KEY
public static final Name IM_KEY
public static final Name COLORSPACE_KEY
public static final Name CS_KEY
public static final Name DECODEPARAM_KEY
public static final Name FILTER_KEY
public static final Name F_KEY
public static final Name INDEXED_KEY
public static final Name I_KEY
protected byte[] rawBytes
protected boolean compressed
protected Reference pObjectReference
| Constructor Detail |
|---|
public Stream(Library l,
java.util.HashMap h,
SeekableInputConstrainedWrapper streamInputWrapper)
l - library containing a hash of all document objectsh - HashMap of parameters specific to the Stream object.streamInputWrapper - Accessor to stream byte data
public Stream(Library l,
java.util.HashMap h,
byte[] rawBytes)
| Method Detail |
|---|
public void setPObjectReference(Reference reference)
setPObjectReference in class Dictionaryreference - Reference used to identify this Dictionary in the PDF
document.Dictionary.getPObjectReference()public byte[] getRawBytes()
public void setRawBytes(byte[] rawBytes)
public boolean isRawBytesCompressed()
public Reference getPObjectReference()
getPObjectReference in class DictionarysetPObjectReference(org.icepdf.core.pobjects.Reference)protected boolean isImageSubtype()
public java.io.ByteArrayInputStream getDecodedByteArrayInputStream()
public byte[] getDecodedStreamBytes()
public byte[] getDecodedStreamBytes(int presize)
presize - potential size to associate with byte array.
protected java.util.List<java.lang.String> getFilterNames()
protected java.util.List<java.lang.String> getNormalisedFilterNames()
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 | ||||||||