com.qoppa.pdf
Interface IEmbeddedFile


public interface IEmbeddedFile

Representation of an embedded file in a PDF document. This interface defines the methods that can be used on an embedded file

Author:
Qoppa Software

Method Summary
 byte[] getDeflatedContents()
          Get the content of the embedded file.
 String getFileName()
          Returns the embedded file name.
 int getSize()
          Get the size of the file content in bytes.
 void open(String tempFileName)
          Open the embedded file.
 void saveFile(File outFile)
          Saves the content of the embedded file to the given File.
 void write(OutputStream outStream)
          Write the file content to an output stream.
 

Method Detail

getFileName

public String getFileName()
Returns the embedded file name.

Returns:
the file name.

saveFile

public void saveFile(File outFile)
              throws IOException,
                     PDFException
Saves the content of the embedded file to the given File.

Parameters:
outFile - the file to save to.
Throws:
IOException
PDFException

open

public void open(String tempFileName)
          throws IOException,
                 PDFException
Open the embedded file.

Parameters:
tempFileName - The name of the file created temporarily to display the file content.
Throws:
IOException
PDFException

getDeflatedContents

public byte[] getDeflatedContents()
                           throws PDFException,
                                  IOException
Get the content of the embedded file.

Returns:
the content bytes array.
Throws:
PDFException
IOException

getSize

public int getSize()
            throws IOException,
                   PDFException
Get the size of the file content in bytes.

Returns:
the size.
Throws:
IOException
PDFException

write

public void write(OutputStream outStream)
           throws IOException,
                  PDFException
Write the file content to an output stream.

Parameters:
outStream - the output stream.
Throws:
IOException
PDFException