public abstract class POIXMLDocument extends POIXMLDocumentPart
Modifier and Type | Field and Description |
---|---|
static String |
DOCUMENT_CREATOR |
static String |
OLE_OBJECT_REL_TYPE |
static String |
PACK_OBJECT_REL_TYPE |
DEFAULT_XML_OPTIONS
Modifier | Constructor and Description |
---|---|
protected |
POIXMLDocument(OPCPackage pkg) |
Modifier and Type | Method and Description |
---|---|
abstract List<PackagePart> |
getAllEmbedds()
Get the document's embedded files.
|
protected PackagePart |
getCorePart() |
OPCPackage |
getPackage() |
POIXMLProperties |
getProperties()
Get the document properties.
|
protected PackagePart[] |
getRelatedByType(String contentType)
Retrieves all the PackageParts which are defined as
relationships of the base document with the
specified content type.
|
static boolean |
hasOOXMLHeader(InputStream inp)
Checks that the supplied InputStream (which MUST
support mark and reset, or be a PushbackInputStream)
has a OOXML (zip) header at the start of it.
|
protected void |
load(POIXMLFactory factory) |
static OPCPackage |
openPackage(String path)
Wrapper to open a package, returning an IOException
in the event of a problem.
|
void |
write(OutputStream stream)
Write out this document to an Outputstream.
|
addRelation, clearMemoryPackagePart, commit, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationCounter, getRelationId, getRelations, getTargetPart, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, read, rebase, removeRelation, removeRelation, toString
public static final String DOCUMENT_CREATOR
public static final String OLE_OBJECT_REL_TYPE
public static final String PACK_OBJECT_REL_TYPE
protected POIXMLDocument(OPCPackage pkg)
public static OPCPackage openPackage(String path) throws IOException
IOException
public OPCPackage getPackage()
protected PackagePart getCorePart()
protected PackagePart[] getRelatedByType(String contentType) throws InvalidFormatException
InvalidFormatException
public static boolean hasOOXMLHeader(InputStream inp) throws IOException
inp
- An InputStream which supports either mark/reset, or is a PushbackInputStreamIOException
public POIXMLProperties getProperties()
public abstract List<PackagePart> getAllEmbedds() throws OpenXML4JException
OpenXML4JException
protected final void load(POIXMLFactory factory) throws IOException
IOException
public final void write(OutputStream stream) throws IOException
stream
- - the java OutputStream you wish to write the file toIOException
- if anything can't be written.Copyright © 2020. All rights reserved.