public class TempFileCommentsTable
extends org.apache.poi.ooxml.POIXMLDocumentPart
implements org.apache.poi.xssf.model.Comments, java.lang.AutoCloseable
The comments table contains all the necessary information for displaying the string: the text, formatting properties, and phonetic properties (for East Asian languages).
This implementation does not extendCommentsTable, so cannot be used for
creating new comments - it can only be used for reading existing comments from saved files.| Constructor and Description |
|---|
TempFileCommentsTable() |
TempFileCommentsTable(boolean encryptTempFiles) |
TempFileCommentsTable(boolean encryptTempFiles,
boolean fullFormat) |
TempFileCommentsTable(org.apache.poi.openxml4j.opc.OPCPackage pkg,
boolean encryptTempFiles) |
TempFileCommentsTable(org.apache.poi.openxml4j.opc.OPCPackage pkg,
boolean encryptTempFiles,
boolean fullFormat) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
commit() |
int |
findAuthor(java.lang.String author) |
org.apache.poi.xssf.usermodel.XSSFComment |
findCellComment(org.apache.poi.ss.util.CellAddress cellAddress) |
java.lang.String |
getAuthor(long authorId) |
java.util.Iterator<org.apache.poi.ss.util.CellAddress> |
getCellAddresses() |
int |
getNumberOfAuthors() |
int |
getNumberOfComments() |
void |
readFrom(java.io.InputStream is)
Read this comments table from an XML file.
|
boolean |
removeComment(org.apache.poi.ss.util.CellAddress cellRef)
Not implemented.
|
void |
writeTo(java.io.OutputStream out)
Write this table out as XML.
|
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, getTargetPart, isCommitted, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, removeRelation, setCommitted, toStringpublic TempFileCommentsTable()
public TempFileCommentsTable(boolean encryptTempFiles)
public TempFileCommentsTable(boolean encryptTempFiles,
boolean fullFormat)
public TempFileCommentsTable(org.apache.poi.openxml4j.opc.OPCPackage pkg,
boolean encryptTempFiles)
throws java.io.IOException
java.io.IOExceptionpublic TempFileCommentsTable(org.apache.poi.openxml4j.opc.OPCPackage pkg,
boolean encryptTempFiles,
boolean fullFormat)
throws java.io.IOException
java.io.IOExceptionprotected void commit()
throws java.io.IOException
commit in class org.apache.poi.ooxml.POIXMLDocumentPartjava.io.IOExceptionpublic void readFrom(java.io.InputStream is)
throws java.io.IOException
is - The input stream containing the XML document.java.io.IOException - if an error occurs while reading.public int getNumberOfComments()
getNumberOfComments in interface org.apache.poi.xssf.model.Commentspublic int getNumberOfAuthors()
getNumberOfAuthors in interface org.apache.poi.xssf.model.Commentspublic java.lang.String getAuthor(long authorId)
getAuthor in interface org.apache.poi.xssf.model.Commentspublic int findAuthor(java.lang.String author)
findAuthor in interface org.apache.poi.xssf.model.Commentspublic org.apache.poi.xssf.usermodel.XSSFComment findCellComment(org.apache.poi.ss.util.CellAddress cellAddress)
findCellComment in interface org.apache.poi.xssf.model.Commentspublic boolean removeComment(org.apache.poi.ss.util.CellAddress cellRef)
removeComment in interface org.apache.poi.xssf.model.Commentsjava.lang.IllegalStateExceptionpublic java.util.Iterator<org.apache.poi.ss.util.CellAddress> getCellAddresses()
getCellAddresses in interface org.apache.poi.xssf.model.Commentspublic void close()
close in interface java.lang.AutoCloseablepublic void writeTo(java.io.OutputStream out)
throws java.io.IOException
out - The stream to write to.java.io.IOException - if an error occurs while writing.