public final class POIFSDocument extends java.lang.Object implements POIFSViewable, java.lang.Iterable<java.nio.ByteBuffer>
POIFSFileSystem
version.
(此类管理 NIO POIFS 文件系统中的文档。这是 POIFSFileSystem 版本。)
Constructor and Description |
---|
POIFSDocument(DocumentNode document)
Constructor for an existing Document
|
POIFSDocument(DocumentProperty property, POIFSFileSystem filesystem)
Constructor for an existing Document
|
POIFSDocument(java.lang.String name, int size, POIFSFileSystem filesystem, POIFSWriterListener writer) |
POIFSDocument(java.lang.String name, POIFSFileSystem filesystem, java.io.InputStream stream)
Constructor for a new Document
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getShortDescription()
Provides a short description of the object, to be used when a POIFSViewable object has not provided its contents.
(提供对象的简短描述,在 POIFSViewable 对象未提供其内容时使用。)
|
int |
getSize() |
java.lang.Object[] |
getViewableArray()
Get an array of objects, some of which may implement POIFSViewable
(获取对象数组,其中一些可能实现 POIFSViewable)
|
java.util.Iterator<java.lang.Object> |
getViewableIterator()
Get an Iterator of objects, some of which may implement POIFSViewable
(获取对象的Iterator,其中一些可能实现POIFSViewable)
|
java.util.Iterator<java.nio.ByteBuffer> |
iterator() |
boolean |
preferArray()
Give viewers a hint as to whether to call getViewableArray or getViewableIterator
(提示查看者是否调用 getViewableArray 或 getViewableIterator)
|
void |
replaceContents(java.io.InputStream stream) |
public POIFSDocument(DocumentNode document)
public POIFSDocument(DocumentProperty property, POIFSFileSystem filesystem)
public POIFSDocument(java.lang.String name, POIFSFileSystem filesystem, java.io.InputStream stream) throws java.io.IOException
name
- the name of the POIFSDocument
(name - POIFSDocument 的名称)
stream
- the InputStream we read data from
(stream - 我们从中读取数据的 InputStream)
java.io.IOException
(java.io.IOException)
public POIFSDocument(java.lang.String name, int size, POIFSFileSystem filesystem, POIFSWriterListener writer) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public java.util.Iterator<java.nio.ByteBuffer> iterator()
iterator
in interface
java.lang.Iterable<java.nio.ByteBuffer>
(接口 java.lang.Iterable 中的迭代器
public int getSize()
public void replaceContents(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public java.lang.Object[] getViewableArray()
getViewableArray
in interface
POIFSViewable
(接口 POIFSViewable 中的 getViewableArray)
public java.util.Iterator<java.lang.Object> getViewableIterator()
getViewableIterator
in interface
POIFSViewable
(接口 POIFSViewable 中的 getViewableIterator)
public boolean preferArray()
preferArray
in interface
POIFSViewable
(接口 POIFSViewable 中的 preferArray)
true
if a viewer should call getViewableArray,
false
if a viewer should call getViewableIterator
(如果查看器应调用 getViewableArray,则为 true;如果查看器应调用 getViewableIterator,则为 false)
public java.lang.String getShortDescription()
getShortDescription
in interface
POIFSViewable
(接口 POIFSViewable 中的 getShortDescription)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.