You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by kl...@apache.org on 2003/09/15 22:13:46 UTC

cvs commit: jakarta-poi/src/examples/src/org/apache/poi/hpsf/examples WriteTitle.java

klute       2003/09/15 13:13:45

  Modified:    src/examples/src/org/apache/poi/hpsf/examples
                        WriteTitle.java
  Log:
  
  
  Revision  Changes    Path
  1.2       +9 -15     jakarta-poi/src/examples/src/org/apache/poi/hpsf/examples/WriteTitle.java
  
  Index: WriteTitle.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/examples/src/org/apache/poi/hpsf/examples/WriteTitle.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WriteTitle.java	13 Sep 2003 12:18:34 -0000	1.1
  +++ WriteTitle.java	15 Sep 2003 20:13:45 -0000	1.2
  @@ -54,19 +54,11 @@
    */
   package org.apache.poi.hpsf.examples;
   
  -import java.io.FileOutputStream;
  -import java.io.IOException;
  -import java.io.InputStream;
  -
  -import org.apache.poi.hpsf.MutableProperty;
  -import org.apache.poi.hpsf.MutablePropertySet;
  -import org.apache.poi.hpsf.MutableSection;
  -import org.apache.poi.hpsf.SummaryInformation;
  -import org.apache.poi.hpsf.Variant;
  -import org.apache.poi.hpsf.WritingNotSupportedException;
  -import org.apache.poi.hpsf.wellknown.PropertyIDMap;
  -import org.apache.poi.hpsf.wellknown.SectionIDMap;
  -import org.apache.poi.poifs.filesystem.POIFSFileSystem;
  +import java.io.*;
  +
  +import org.apache.poi.hpsf.*;
  +import org.apache.poi.hpsf.wellknown.*;
  +import org.apache.poi.poifs.filesystem.*;
   
   /**
    * <p>This class is a simple sample application showing how to create a property
  @@ -99,7 +91,6 @@
           }
   
           final String fileName = args[0];
  -        final POIFSFileSystem poiFs = new POIFSFileSystem();
   
           /* Create a mutable property set. Initially it contains a single section
            * with no properties. */
  @@ -121,6 +112,9 @@
           p.setID(PropertyIDMap.PID_TITLE);
           p.setType(Variant.VT_LPWSTR);
           p.setValue("Sample title");
  +
  +        /* Create the POI file system the property set is to be written to. */
  +        final POIFSFileSystem poiFs = new POIFSFileSystem();
   
           /* For writing the property set into a POI file system it has to be
            * handed over to the POIFS.createDocument() method as an input stream
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org