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, deflated.
 String getFileName()
          Returns the embedded file name.
 InputStream getInputStream()
          Returns an input stream from which the file contents can be read.
 int getSize()
          Get the size of the file content in bytes.
 void saveFile(File outFile)
          Saves the content of the embedded file to the given output file.
 void write(OutputStream outStream)
          Write the file content to an output stream.
 

Method Detail

getFileName

String getFileName()
Returns the embedded file name.

Returns:
the file name.

saveFile

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

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

getDeflatedContents

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

Returns:
the content bytes array.
Throws:
PDFException
IOException

getSize

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

Returns:
the size.
Throws:
IOException
PDFException

write

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

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

getInputStream

InputStream getInputStream()
                           throws PDFException,
                                  IOException
Returns an input stream from which the file contents can be read.

Returns:
Input stream to read file contents
Throws:
PDFException
IOException