public final class POIFSDocument extends java.lang.Object implements POIFSViewable, java.lang.Iterable<java.nio.ByteBuffer>
POIFSFileSystem
version.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.
|
int |
getSize() |
java.lang.Object[] |
getViewableArray()
Get an array of objects, some of which may implement POIFSViewable
|
java.util.Iterator<java.lang.Object> |
getViewableIterator()
Get an Iterator of objects, some of which may implement POIFSViewable
|
java.util.Iterator<java.nio.ByteBuffer> |
iterator() |
boolean |
preferArray()
Give viewers a hint as to whether to call getViewableArray or
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 POIFSDocumentstream
- the InputStream we read data fromjava.io.IOException
public POIFSDocument(java.lang.String name, int size, POIFSFileSystem filesystem, POIFSWriterListener writer) throws java.io.IOException
java.io.IOException
public java.util.Iterator<java.nio.ByteBuffer> iterator()
iterator
in interface java.lang.Iterable<java.nio.ByteBuffer>
public int getSize()
public void replaceContents(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
public java.lang.Object[] getViewableArray()
getViewableArray
in interface POIFSViewable
public java.util.Iterator<java.lang.Object> getViewableIterator()
getViewableIterator
in interface POIFSViewable
public boolean preferArray()
preferArray
in interface POIFSViewable
true
if a viewer should call getViewableArray,
false
if a viewer should call getViewableIteratorpublic java.lang.String getShortDescription()
getShortDescription
in interface POIFSViewable
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.