public class PRStream extends PdfStream
| Modifier and Type | Field and Description |
|---|---|
protected int |
length |
protected int |
objGen |
protected int |
objNum |
protected int |
offset |
protected PdfReader |
reader |
BEST_COMPRESSION, BEST_SPEED, compressed, compressionLevel, DEFAULT_COMPRESSION, inputStream, inputStreamLength, NO_COMPRESSION, rawLength, ref, streamBytes, writer| Constructor and Description |
|---|
PRStream(PdfReader reader,
byte[] conts) |
PRStream(PdfReader reader,
byte[] conts,
int compressionLevel)
Creates a new PDF stream object that will replace a stream in a existing PDF file.
|
PRStream(PdfReader reader,
int offset) |
PRStream(PRStream stream,
PdfDictionary newDic) |
PRStream(PRStream stream,
PdfDictionary newDic,
PdfReader reader) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Gets the presentation of this object in a byte array
|
int |
getLength() |
int |
getOffset() |
PdfReader |
getReader() |
void |
setData(byte[] data)
Sets the data associated with the stream
|
void |
setData(byte[] data,
boolean compress)
Sets the data associated with the stream, either compressed or uncompressed.
|
void |
setData(byte[] data,
boolean compress,
int compressionLevel)
Sets the data associated with the stream, either compressed or uncompressed.
|
void |
setLength(int length) |
void |
setObjNum(int objNum,
int objGen) |
void |
toPdf(PdfWriter writer,
OutputStream os)
Writes the PDF representation of this
PdfDictionary as an array of byte to the given
OutputStream. |
flateCompress, flateCompress, getRawLength, superToPdf, toString, writeContent, writeLengthclear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, getKeysAndValues, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, sizecanBeInObjStm, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, typeprotected PdfReader reader
protected int offset
protected int length
protected int objNum
protected int objGen
public PRStream(PRStream stream, PdfDictionary newDic)
public PRStream(PRStream stream, PdfDictionary newDic, PdfReader reader)
public PRStream(PdfReader reader, int offset)
public PRStream(PdfReader reader, byte[] conts)
public PRStream(PdfReader reader, byte[] conts, int compressionLevel)
reader - the reader that holds the existing PDFconts - the new contentcompressionLevel - the compression level for the contentpublic void setData(byte[] data,
boolean compress)
data - raw data, decrypted and uncompressed.compress - true if you want the stream to be compressed.public void setData(byte[] data,
boolean compress,
int compressionLevel)
data - raw data, decrypted and uncompressed.compress - true if you want the stream to be compressed.compressionLevel - a value between -1 and 9 (ignored if compress == false)public void setData(byte[] data)
data - raw data, decrypted and uncompressed.public int getOffset()
public int getLength()
public void setLength(int length)
public PdfReader getReader()
public byte[] getBytes()
PdfObjectpublic void setObjNum(int objNum,
int objGen)
public void toPdf(PdfWriter writer, OutputStream os) throws IOException
PdfDictionaryPdfDictionary as an array of byte to the given
OutputStream.toPdf in class PdfStreamwriter - for backwards compatibilityos - the OutputStream to write the bytes to.IOException - on errorPdfDictionary.toPdf(com.lowagie.text.pdf.PdfWriter, java.io.OutputStream)Copyright © 2024. All rights reserved.