|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFStream
class representing a PDF stream. A derivative of the PDF Object, a PDF Stream has not only a dictionary but a stream of PDF commands. The stream of commands is where the real work is done, the dictionary just provides information like the stream length.
Field Summary | |
---|---|
protected java.io.ByteArrayOutputStream |
_data
the stream of PDF commands |
Fields inherited from class org.apache.fop.pdf.PDFObject |
---|
generation, number |
Constructor Summary | |
---|---|
PDFStream(int number)
create an empty stream object |
Method Summary | |
---|---|
void |
add(java.lang.String s)
append data to the stream |
protected void |
addDefaultFilters()
|
void |
addFilter(PDFFilter filter)
Add a filter for compression of the stream. |
void |
addFilter(java.lang.String filterType)
|
void |
addImageArray(int[] pixels,
int width,
int height)
append an array of xRGB pixels, ASCII Hex Encoding it first |
protected java.lang.String |
applyFilters()
Apply the filters to the data in the order given and return the /Filter and /DecodeParms entries for the stream dictionary. |
byte[] |
getData()
|
int |
getDataLength()
|
protected int |
output(java.io.OutputStream stream)
write the PDF represention of this object |
protected int |
outputStreamData(java.io.OutputStream stream)
Output just the stream data enclosed by stream/endstream markers |
void |
setData(byte[] data)
|
byte[] |
toPDF()
represent as PDF. |
Methods inherited from class org.apache.fop.pdf.PDFObject |
---|
getNumber, referencePDF |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.ByteArrayOutputStream _data
Constructor Detail |
public PDFStream(int number)
number
- the object's numberMethod Detail |
public void add(java.lang.String s)
s
- the string of PDF to addpublic void addFilter(PDFFilter filter)
public void addFilter(java.lang.String filterType)
protected void addDefaultFilters()
public void addImageArray(int[] pixels, int width, int height)
pixels
- the area of pixelswidth
- the width of the image in pixelsheight
- the height of the image in pixelspublic void setData(byte[] data) throws java.io.IOException
java.io.IOException
public byte[] getData()
public int getDataLength()
public byte[] toPDF()
protected int output(java.io.OutputStream stream) throws java.io.IOException
PDFObject
output
in class PDFObject
stream
- the stream to write the PDF to
java.io.IOException
protected int outputStreamData(java.io.OutputStream stream) throws java.io.IOException
java.io.IOException
protected java.lang.String applyFilters() throws java.io.IOException
java.io.IOException
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |