com.itextpdf.text.pdf
Class PdfEFStream

java.lang.Object
  extended by com.itextpdf.text.pdf.PdfObject
      extended by com.itextpdf.text.pdf.PdfDictionary
          extended by com.itextpdf.text.pdf.PdfStream
              extended by com.itextpdf.text.pdf.PdfEFStream

public class PdfEFStream
extends PdfStream

Extends PdfStream and should be used to create Streams for Embedded Files (file attachments).

Since:
2.1.3

Field Summary
 
Fields inherited from class com.itextpdf.text.pdf.PdfStream
BEST_COMPRESSION, BEST_SPEED, compressed, compressionLevel, DEFAULT_COMPRESSION, inputStream, inputStreamLength, NO_COMPRESSION, rawLength, ref, streamBytes, writer
 
Fields inherited from class com.itextpdf.text.pdf.PdfDictionary
CATALOG, FONT, hashMap, OUTLINES, PAGE, PAGES
 
Fields inherited from class com.itextpdf.text.pdf.PdfObject
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, indRef, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type
 
Constructor Summary
PdfEFStream(byte[] fileStore)
          Creates a Stream object using a byte array
PdfEFStream(InputStream in, PdfWriter writer)
          Creates a Stream object using an InputStream and a PdfWriter object
 
Method Summary
 void toPdf(PdfWriter writer, OutputStream os)
          Writes the PDF representation of this PdfDictionary as an array of byte to the given OutputStream.
 
Methods inherited from class com.itextpdf.text.pdf.PdfStream
flateCompress, flateCompress, getRawLength, superToPdf, toString, writeContent, writeLength
 
Methods inherited from class com.itextpdf.text.pdf.PdfDictionary
checkType, clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size
 
Methods inherited from class com.itextpdf.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PdfEFStream

public PdfEFStream(InputStream in,
                   PdfWriter writer)
Creates a Stream object using an InputStream and a PdfWriter object

Parameters:
in - the InputStream that will be read to get the Stream object
writer - the writer to which the stream will be added

PdfEFStream

public PdfEFStream(byte[] fileStore)
Creates a Stream object using a byte array

Parameters:
fileStore - the bytes for the stream
Method Detail

toPdf

public void toPdf(PdfWriter writer,
                  OutputStream os)
           throws IOException
Description copied from class: PdfDictionary
Writes the PDF representation of this PdfDictionary as an array of byte to the given OutputStream.

Overrides:
toPdf in class PdfStream
Parameters:
writer - for backwards compatibility
os - the OutputStream to write the bytes to.
Throws:
IOException
See Also:
PdfDictionary.toPdf(com.itextpdf.text.pdf.PdfWriter, java.io.OutputStream)


Copyright © 2014. All Rights Reserved.