]> source.dussan.org Git - poi.git/commitdiff
Add main method
authorNick Burch <nick@apache.org>
Tue, 15 Jun 2010 11:40:00 +0000 (11:40 +0000)
committerNick Burch <nick@apache.org>
Tue, 15 Jun 2010 11:40:00 +0000 (11:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@954834 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java

index 14bb16887dca6a426c3d2686df7dd15bc5ca3540..1ba9b6441cb549ca187a4963d5beb31de51e3702 100644 (file)
@@ -17,6 +17,8 @@
 
 package org.apache.poi.hpsf.extractor;
 
+import java.io.FileInputStream;
+import java.io.IOException;
 import java.io.OutputStream;
 import java.util.Iterator;
 
@@ -150,4 +152,13 @@ public class HPSFPropertiesExtractor extends POITextExtractor {
                        throw new IllegalStateException("Unable to write, only for properties!");
                }
        }
+       
+       public static void main(String[] args) throws IOException {
+          for(String file : args) {
+             HPSFPropertiesExtractor ext = new HPSFPropertiesExtractor(
+                   new POIFSFileSystem(new FileInputStream(file))
+             );
+             System.out.println(ext.getText());
+          }
+       }
 }