Community articleextractFile method
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.



Description

This method will extract an enclosure contained in a node and save it to a file on the local computer. Note that this method does not remove the enclosure from the form.

Method

   public void extractFile(
      String theFile
  ) throws UWIException;


Parameters

Table 1. Method parameters
ExpressionTypeDescription
theFileStringThe path showing where to store the file on the local drive. Any existing file will be overwritten.


Returns

Nothing if call is successful or throws a generic exception (UWIException) if an error occurs.

Example

In the following example, dereferenceEx is used to locate a specific data item node. extractFile is then used to write the image data to the local drive.
   private static void exportImage(FormNodeP theForm) throws Exception
   {
   FormNodeP tempNode;
 
      if ((tempNode = theForm.dereferenceEx(null, "PAGE1.LOGODATA", 0, 
         FormNodeP.UFL_ITEM_REFERENCE, null)) == null)
      {
         throw new UWIException("Could not find LOGODATA node.");
      }
 
      tempNode.extractFile("logo.jpg");
   }


Parent topic:
FormNodeP class