public abstract class POIXMLRelation
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
POIXMLRelation.NoArgConstructor |
static interface |
POIXMLRelation.PackagePartConstructor |
static interface |
POIXMLRelation.ParentPartConstructor |
Modifier | Constructor and Description |
---|---|
protected |
POIXMLRelation(java.lang.String type, java.lang.String rel, java.lang.String defaultName)
Instantiates a POIXMLRelation.
(实例化 POIXMLRelation。)
|
protected |
POIXMLRelation(java.lang.String type, java.lang.String rel, java.lang.String defaultName, POIXMLRelation.NoArgConstructor noArgConstructor, POIXMLRelation.PackagePartConstructor packagePartConstructor, POIXMLRelation.ParentPartConstructor parentPartConstructor)
Instantiates a POIXMLRelation.
(实例化 POIXMLRelation。)
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getContents(PackagePart corePart)
Fetches the InputStream to read the contents, based of the specified core part, for which we are defined as a suitable relationship
(获取 InputStream 读取内容,基于指定的核心部分,我们定义为合适的关系)
|
java.lang.String |
getContentType()
Return the content type.
(返回内容类型。)
|
java.lang.String |
getDefaultFileName()
Return the default part name.
(返回默认零件名称。)
|
java.lang.String |
getFileName(int index)
Returns the filename for the nth one of these, e.g.
(返回其中第 n 个的文件名,例如)
|
java.lang.Integer |
getFileNameIndex(POIXMLDocumentPart part)
Returns the index of the filename within the package for the given part.
(返回给定部分的包中文件名的索引。)
|
POIXMLRelation.NoArgConstructor |
getNoArgConstructor() |
POIXMLRelation.PackagePartConstructor |
getPackagePartConstructor() |
POIXMLRelation.ParentPartConstructor |
getParentPartConstructor() |
java.lang.String |
getRelation()
Return the relationship, the kind of connection between a source part and a target part in a package.
(返回关系,即包中源部件和目标部件之间的连接类型。)
|
protected POIXMLRelation(java.lang.String type, java.lang.String rel, java.lang.String defaultName, POIXMLRelation.NoArgConstructor noArgConstructor, POIXMLRelation.PackagePartConstructor packagePartConstructor, POIXMLRelation.ParentPartConstructor parentPartConstructor)
type
- content type
(类型 - 内容类型)
rel
- relationship
(rel - 关系)
defaultName
- default item name
(defaultName - 默认项目名称)
noArgConstructor
- method used to construct instances of this relationship from scratch
(noArgConstructor - 用于从头开始构造此关系实例的方法)
packagePartConstructor
- method used to construct instances of this relationship with a package part
(packagePartConstructor - 用于构造与包部件的这种关系的实例的方法)
protected POIXMLRelation(java.lang.String type, java.lang.String rel, java.lang.String defaultName)
type
- content type
(类型 - 内容类型)
rel
- relationship
(rel - 关系)
defaultName
- default item name
(defaultName - 默认项目名称)
public java.lang.String getContentType()
public java.lang.String getRelation()
public java.lang.String getDefaultFileName()
public java.lang.String getFileName(int index)
index
- the suffix for the document type
(index - 文档类型的后缀)
public java.lang.Integer getFileNameIndex(POIXMLDocumentPart part)
part
- the part to read the suffix from
(part - 读取后缀的部分)
public POIXMLRelation.NoArgConstructor getNoArgConstructor()
public POIXMLRelation.PackagePartConstructor getPackagePartConstructor()
public POIXMLRelation.ParentPartConstructor getParentPartConstructor()
public java.io.InputStream getContents(PackagePart corePart) throws java.io.IOException, InvalidFormatException
java.io.IOException
(java.io.IOException)
InvalidFormatException
(无效格式异常)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.