You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2021/12/22 15:01:01 UTC
svn commit: r1896280 - /poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
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: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org