Author: fanningpj
Date: Wed Dec 22 15:01:01 2021
New Revision: 1896280

URL: http://svn.apache.org/viewvc?rev=1896280&view=rev
Log:
extra constructors

Modified:
    
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java

Modified: 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java?rev=1896280&r1=1896279&r2=1896280&view=diff
==============================================================================
--- 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
 (original)
+++ 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
 Wed Dec 22 15:01:01 2021
@@ -148,14 +148,31 @@ public class ReadOnlySharedStringsTable
     }
 
     /**
-     * Like POIXMLDocumentPart constructor
-     *
      * @since POI 3.14-Beta3
      */
     public ReadOnlySharedStringsTable(PackagePart part, boolean 
includePhoneticRuns)
         throws IOException, SAXException {
         this.includePhoneticRuns = includePhoneticRuns;
-        readFrom(part.getInputStream());
+        try (InputStream stream = part.getInputStream()) {
+            readFrom(stream);
+        }
+    }
+
+    /**
+     * @since POI 5.2.0
+     */
+    public ReadOnlySharedStringsTable(InputStream stream)
+            throws IOException, SAXException {
+        this(stream, true);
+    }
+
+    /**
+     * @since POI 5.2.0
+     */
+    public ReadOnlySharedStringsTable(InputStream stream, boolean 
includePhoneticRuns)
+            throws IOException, SAXException {
+        this.includePhoneticRuns = includePhoneticRuns;
+        readFrom(stream);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to