org.apache.poi.hpsf.examples
Class WriteAuthorAndTitle

java.lang.Object
  extended by org.apache.poi.hpsf.examples.WriteAuthorAndTitle

public class WriteAuthorAndTitle
extends java.lang.Object

This class is a sample application which shows how to write or modify the author and title property of an OLE 2 document. This could be done in two different ways:

This sample application takes the second approach. It expects the name of the existing POI filesystem's name as its first command-line parameter and the name of the output POIFS as the second command-line argument. The program then works as described above: It copies nearly all documents unmodified from the input POI filesystem to the output POI filesystem. If it encounters a summary information stream it reads its properties. Then it sets the "author" and "title" properties to new values and writes the modified summary information stream into the output file.

Further explanations can be found in the HPSF HOW-TO.

Since:
2003-09-01
Version:
$Id: WriteAuthorAndTitle.java 489730 2006-12-22 19:18:16Z bayard $
Author:
Rainer Klute <klute@rainer-klute.de>

Constructor Summary
WriteAuthorAndTitle()
           
 
Method Summary
static void main(java.lang.String[] args)
          Runs the example program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteAuthorAndTitle

public WriteAuthorAndTitle()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException

Runs the example program.

Parameters:
args - Command-line arguments. The first command-line argument must be the name of a POI filesystem to read.
Throws:
java.io.IOException - if any I/O exception occurs.


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.