Class NPOIFSDocument
java.lang.Object
org.docx4j.org.apache.poi.poifs.filesystem.NPOIFSDocument
- All Implemented Interfaces:
POIFSViewable
This class manages a document in the NIO POIFS filesystem.
This is the
NPOIFSFileSystem version.-
Constructor Summary
ConstructorsConstructorDescriptionNPOIFSDocument(String name, int size, NPOIFSFileSystem filesystem, POIFSWriterListener writer) NPOIFSDocument(String name, NPOIFSFileSystem filesystem, InputStream stream) Constructor for a new DocumentNPOIFSDocument(DocumentNode document) Constructor for an existing DocumentNPOIFSDocument(DocumentProperty property, NPOIFSFileSystem filesystem) Constructor for an existing Document -
Method Summary
Modifier and TypeMethodDescriptionProvides a short description of the object, to be used when a POIFSViewable object has not provided its contents.intgetSize()Object[]Get an array of objects, some of which may implement POIFSViewableGet an Iterator of objects, some of which may implement POIFSViewablebooleanGive viewers a hint as to whether to call getViewableArray or getViewableIteratorvoidreplaceContents(InputStream stream)
-
Constructor Details
-
NPOIFSDocument
Constructor for an existing Document- Throws:
IOException
-
NPOIFSDocument
Constructor for an existing Document- Throws:
IOException
-
NPOIFSDocument
public NPOIFSDocument(String name, NPOIFSFileSystem filesystem, InputStream stream) throws IOException Constructor for a new Document- Parameters:
name- the name of the POIFSDocumentstream- the InputStream we read data from- Throws:
IOException
-
NPOIFSDocument
public NPOIFSDocument(String name, int size, NPOIFSFileSystem filesystem, POIFSWriterListener writer) throws IOException - Throws:
IOException
-
-
Method Details
-
getSize
public int getSize()- Returns:
- size of the document
-
replaceContents
- Throws:
IOException
-
getViewableArray
Get an array of objects, some of which may implement POIFSViewable- Specified by:
getViewableArrayin interfacePOIFSViewable- Returns:
- an array of Object; may not be null, but may be empty
-
getViewableIterator
Get an Iterator of objects, some of which may implement POIFSViewable- Specified by:
getViewableIteratorin interfacePOIFSViewable- Returns:
- an Iterator; may not be null, but may have an empty back end store
-
preferArray
public boolean preferArray()Give viewers a hint as to whether to call getViewableArray or getViewableIterator- Specified by:
preferArrayin interfacePOIFSViewable- Returns:
trueif a viewer should call getViewableArray,falseif a viewer should call getViewableIterator
-
getShortDescription
Provides a short description of the object, to be used when a POIFSViewable object has not provided its contents.- Specified by:
getShortDescriptionin interfacePOIFSViewable- Returns:
- short description
-