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.
|
java.lang.String |
getBookName() |
java.lang.String |
getLinkIndex() |
protected void |
readFrom(java.io.InputStream is)
Read this shared external links from an XML file.
|
void |
setBookName(java.lang.String bookname) |
void |
setLinkIndex(java.lang.String index) |
void |
writeTo(java.io.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 java.io.IOException
java.io.IOException
protected 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 java.lang.String getBookName()
public void setBookName(java.lang.String bookname)
public java.lang.String getLinkIndex()
public void setLinkIndex(java.lang.String index)
public 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.protected void commit() throws java.io.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
java.io.IOException
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.