summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2010-06-15 11:40:00 +0000
committerNick Burch <nick@apache.org>2010-06-15 11:40:00 +0000
commitde6f455d6d156868eb9f131c5330c83a1234b2c3 (patch)
tree9dc03df0e42adab0ce8e133108a8f7a55b58fde5
parent741f499c4ad6dd68e1ef5abe54ea4444e4cabc95 (diff)
downloadpoi-de6f455d6d156868eb9f131c5330c83a1234b2c3.tar.gz
poi-de6f455d6d156868eb9f131c5330c83a1234b2c3.zip
Add main method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@954834 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java b/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java
index 14bb16887d..1ba9b6441c 100644
--- a/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java
+++ b/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java
@@ -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());
+ }
+ }
}