FileDocCategorySizeDatePackage
ReadCustomPropertySets.javaAPI DocApache Poi 3.0.15050Mon Jan 01 12:39:42 GMT 2007org.apache.poi.hpsf.examples

ReadCustomPropertySets

public class ReadCustomPropertySets extends Object

Sample application showing how to read a document's custom property set. Call it with the document's file name as command-line parameter.

Explanations can be found in the HPSF HOW-TO.

author
Rainer Klute <klute@rainer-klute.de>
version
$Id: ReadCustomPropertySets.java 489730 2006-12-22 19:18:16Z bayard $
since
2003-02-01

Fields Summary
Constructors Summary
Methods Summary
static java.lang.Stringhex(byte[] bytes)

        return HexDump.dump(bytes, 0L, 0);
    
public static voidmain(java.lang.String[] args)

Runs the example program.

param
args Command-line arguments (unused).
throws
IOException if any I/O exception occurs.

        final String filename = args[0];
        POIFSReader r = new POIFSReader();

        /* Register a listener for *all* documents. */
        r.registerListener(new MyPOIFSReaderListener());
        r.read(new FileInputStream(filename));
    
static voidout(java.lang.String msg)

        System.out.println(msg);