public class ExternalLink extends POIXMLDocumentPart
Modifier and Type | Field and Description |
---|---|
static int |
FIRST_CUSTOM_STYLE_ID
The first style id available for use as a custom style
|
DEFAULT_XML_OPTIONS
Constructor and Description |
---|
ExternalLink()
Create a new, empty StylesTable
|
ExternalLink(PackagePart part,
PackageRelationship rel) |
Modifier and Type | Method and Description |
---|---|
protected void |
commit()
Save the content in the underlying package part.
|
String |
getBookName() |
String |
getLinkIndex() |
protected void |
readFrom(InputStream is)
Read this shared external links from an XML file.
|
void |
setBookName(String bookname) |
void |
setLinkIndex(String index) |
void |
writeTo(OutputStream out)
Write this external link out as XML.
|
addRelation, clearMemoryPackagePart, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationCounter, getRelationId, getRelations, getTargetPart, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, read, rebase, removeRelation, removeRelation, toString
public static final int FIRST_CUSTOM_STYLE_ID
public ExternalLink()
public ExternalLink(PackagePart part, PackageRelationship rel) throws IOException
IOException
protected void readFrom(InputStream is) throws IOException
is
- The input stream containing the XML document.IOException
- if an error occurs while reading.public String getBookName()
public void setBookName(String bookname)
public String getLinkIndex()
public void setLinkIndex(String index)
public void writeTo(OutputStream out) throws IOException
out
- The stream to write to.IOException
- if an error occurs while writing.protected void commit() throws IOException
POIXMLDocumentPart
protected void commit() throws IOException {
PackagePart part = getPackagePart();
OutputStream out = part.getOutputStream();
XmlObject bean = getXmlBean(); //the "model" which holds changes in memory
bean.save(out, DEFAULT_XML_OPTIONS);
out.close();
}
commit
in class POIXMLDocumentPart
IOException
Copyright © 2020. All rights reserved.