public class ReadOnlySharedStringsTable extends DefaultHandler implements org.apache.poi.xssf.model.SharedStrings
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
count
An integer representing the total count of strings in the workbook.
|
| 构造器和说明 |
|---|
ReadOnlySharedStringsTable(org.apache.poi.openxml4j.opc.OPCPackage pkg,
StringsCache stringsCache) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Captures characters only if a t(ext) element is open.
|
void |
endElement(String uri,
String localName,
String name) |
int |
getCount()
Return an integer representing the total count of strings in the workbook.
|
org.apache.poi.ss.usermodel.RichTextString |
getItemAt(int idx) |
int |
getUniqueCount()
Returns an integer representing the total count of unique strings in the Shared String Table.
|
void |
readFrom(InputStream is)
Read this shared strings table from an XML file.
|
void |
startElement(String uri,
String localName,
String name,
Attributes attributes) |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningprotected int count
public ReadOnlySharedStringsTable(org.apache.poi.openxml4j.opc.OPCPackage pkg,
StringsCache stringsCache)
throws IOException,
SAXException
pkg - The OPCPackage to use as basis for the shared-strings table.stringsCache - stringsCacheIOException - If reading the data from the package fails.SAXException - if parsing the XML data fails.public void readFrom(InputStream is) throws IOException, SAXException
is - The input stream containing the XML document.IOException - if an error occurs while reading.SAXException - if parsing the XML data fails.public int getCount()
getCount 在接口中 org.apache.poi.xssf.model.SharedStringspublic int getUniqueCount()
getUniqueCount 在接口中 org.apache.poi.xssf.model.SharedStringspublic org.apache.poi.ss.usermodel.RichTextString getItemAt(int idx)
getItemAt 在接口中 org.apache.poi.xssf.model.SharedStringspublic void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException
startElement 在接口中 ContentHandlerstartElement 在类中 DefaultHandlerSAXExceptionpublic void endElement(String uri, String localName, String name) throws SAXException
endElement 在接口中 ContentHandlerendElement 在类中 DefaultHandlerSAXExceptionpublic void characters(char[] ch,
int start,
int length)
throws SAXException
characters 在接口中 ContentHandlercharacters 在类中 DefaultHandlerSAXExceptionCopyright © 2021. All rights reserved.