This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git
The following commit(s) were added to refs/heads/trunk by this push:
new f669cec72f add password support
f669cec72f is described below
commit f669cec72f74ce09cae74a0d840b1c780b627871
Author: PJ Fanning <[email protected]>
AuthorDate: Thu Mar 5 01:50:22 2026 +0100
add password support
---
.../apache/poi/hwpf/extractor/WordExtractor.java | 40 +++++++++++++++++++++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git
a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/extractor/WordExtractor.java
b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/extractor/WordExtractor.java
index 06c4a202ae..f6ecdf0871 100644
---
a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/extractor/WordExtractor.java
+++
b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/extractor/WordExtractor.java
@@ -47,7 +47,18 @@ public final class WordExtractor implements
POIOLE2TextExtractor {
* InputStream containing the word file
*/
public WordExtractor( InputStream is ) throws IOException {
- this(HWPFDocumentCore.verifyAndBuildPOIFS(is ) );
+ this(HWPFDocumentCore.verifyAndBuildPOIFS(is));
+ }
+
+ /**
+ * Create a new Word Extractor
+ *
+ * @param is InputStream containing the word file
+ * @param password as a char array (can be null)
+ * @since 6.0.0
+ */
+ public WordExtractor( InputStream is, char[] password ) throws IOException
{
+ this(HWPFDocumentCore.verifyAndBuildPOIFS(is), password);
}
/**
@@ -60,10 +71,37 @@ public final class WordExtractor implements
POIOLE2TextExtractor {
this( new HWPFDocument( fs ) );
}
+ /**
+ * Create a new Word Extractor
+ *
+ * @param fs POIFSFileSystem containing the word file
+ * @param password as a char array (can be null)
+ * @since 6.0.0
+ */
+ public WordExtractor( POIFSFileSystem fs, char[] password ) throws
IOException {
+ this( new HWPFDocument( fs, password ) );
+ }
+
+ /**
+ * Create a new Word Extractor
+ *
+ * @param dir DirectoryNode containing the word file
+ */
public WordExtractor( DirectoryNode dir ) throws IOException {
this( new HWPFDocument( dir ) );
}
+ /**
+ * Create a new Word Extractor
+ *
+ * @param dir DirectoryNode containing the word file
+ * @param password as a char array (can be null)
+ * @since 6.0.0
+ */
+ public WordExtractor( DirectoryNode dir, char[] password ) throws
IOException {
+ this( new HWPFDocument( dir, password ) );
+ }
+
/**
* Create a new Word Extractor
*
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]