## org.apache.poi.poifs.filesystem
Class NPOIFSDocument

    java.lang.Object
      org.apache.poi.poifs.filesystem.NPOIFSDocument

All Implemented Interfaces:
  POIFSViewable

    public final class NPOIFSDocument

extends java.lang.Object
implements POIFSViewable

This class manages a document in the NIO POIFS filesystem. This is the `NPOIFSFileSystem` version.

Constructor Summary
`NPOIFSDocument(DocumentProperty property, NPOIFSFileSystem filesystem)` Constructor for an existing Document
`NPOIFSDocument(java.lang.String name, NPOIFSFileSystem filesystem, java.io.InputStream stream)` Constructor for a new Document

Method Summary
`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` `getViewableIterator()` Get an Iterator of objects, some of which may implement POIFSViewable
`boolean` `preferArray()` Give viewers a hint as to whether to call getViewableArray or getViewableIterator

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NPOIFSDocument

    public NPOIFSDocument(DocumentProperty property,
                          NPOIFSFileSystem filesystem)
                   throws java.io.IOException

  Constructor for an existing Document

  Throws:
    `java.io.IOException`

### NPOIFSDocument

    public NPOIFSDocument(java.lang.String name,
                          NPOIFSFileSystem filesystem,
                          java.io.InputStream stream)
                   throws java.io.IOException

  Constructor for a new Document

  Parameters:
    `name` - the name of the POIFSDocument
    `stream` - the InputStream we read data from
  Throws:
    `java.io.IOException`

Method Detail

### getSize

    public int getSize()

  Returns:
    size of the document

### getViewableArray

    public java.lang.Object[] getViewableArray()

  Get an array of objects, some of which may implement POIFSViewable

  Specified by:
    `getViewableArray` in interface `POIFSViewable`
  Returns:
    an array of Object; may not be null, but may be empty

### getViewableIterator

    public java.util.Iterator getViewableIterator()

  Get an Iterator of objects, some of which may implement POIFSViewable

  Specified by:
    `getViewableIterator` in interface `POIFSViewable`
  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:
    `preferArray` in interface `POIFSViewable`
  Returns:
    `true` if a viewer should call getViewableArray, `false` if a viewer should call getViewableIterator

### getShortDescription

    public java.lang.String getShortDescription()

  Provides a short description of the object, to be used when a POIFSViewable object has not provided its contents.

  Specified by:
    `getShortDescription` in interface `POIFSViewable`
  Returns:
    short description

Copyright 2012 The Apache Software Foundation or its licensors, as applicable.