public final class OPOIFSDocument extends java.lang.Object implements BATManaged, BlockWritable, POIFSViewable
| Constructor and Description |
|---|
OPOIFSDocument(java.lang.String name,
java.io.InputStream stream) |
OPOIFSDocument(java.lang.String name,
int size,
POIFSBigBlockSize bigBlockSize,
POIFSDocumentPath path,
POIFSWriterListener writer)
Constructor
|
OPOIFSDocument(java.lang.String name,
int size,
POIFSDocumentPath path,
POIFSWriterListener writer) |
OPOIFSDocument(java.lang.String name,
ListManagedBlock[] blocks,
int length) |
OPOIFSDocument(java.lang.String name,
POIFSBigBlockSize bigBlockSize,
java.io.InputStream stream)
Constructor
|
OPOIFSDocument(java.lang.String name,
POIFSBigBlockSize bigBlockSize,
ListManagedBlock[] blocks,
int length)
Constructor from small blocks
|
OPOIFSDocument(java.lang.String name,
RawDataBlock[] blocks,
int length)
Constructor from large blocks
|
OPOIFSDocument(java.lang.String name,
SmallDocumentBlock[] blocks,
int length)
Constructor from small blocks
|
| Modifier and Type | Method and Description |
|---|---|
int |
countBlocks()
Return the number of BigBlock's this instance uses
|
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() |
SmallDocumentBlock[] |
getSmallBlocks() |
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
|
boolean |
preferArray()
Give viewers a hint as to whether to call getViewableArray or
getViewableIterator
|
void |
setStartBlock(int index)
Set the start block for this instance
|
void |
writeBlocks(java.io.OutputStream stream)
Write the storage to an OutputStream
|
public OPOIFSDocument(java.lang.String name,
RawDataBlock[] blocks,
int length)
throws java.io.IOException
name - the name of the POIFSDocumentblocks - the big blocks making up the POIFSDocumentlength - the actual length of the POIFSDocumentjava.io.IOExceptionpublic OPOIFSDocument(java.lang.String name,
SmallDocumentBlock[] blocks,
int length)
name - the name of the POIFSDocumentblocks - the small blocks making up the POIFSDocumentlength - the actual length of the POIFSDocumentpublic OPOIFSDocument(java.lang.String name,
POIFSBigBlockSize bigBlockSize,
ListManagedBlock[] blocks,
int length)
throws java.io.IOException
name - the name of the POIFSDocumentblocks - the small blocks making up the POIFSDocumentlength - the actual length of the POIFSDocumentjava.io.IOExceptionpublic OPOIFSDocument(java.lang.String name,
ListManagedBlock[] blocks,
int length)
throws java.io.IOException
java.io.IOExceptionpublic OPOIFSDocument(java.lang.String name,
POIFSBigBlockSize bigBlockSize,
java.io.InputStream stream)
throws java.io.IOException
name - the name of the POIFSDocumentstream - the InputStream we read data fromjava.io.IOExceptionpublic OPOIFSDocument(java.lang.String name,
java.io.InputStream stream)
throws java.io.IOException
java.io.IOExceptionpublic OPOIFSDocument(java.lang.String name,
int size,
POIFSBigBlockSize bigBlockSize,
POIFSDocumentPath path,
POIFSWriterListener writer)
name - the name of the POIFSDocumentsize - the length of the POIFSDocumentpath - the path of the POIFSDocumentwriter - the writer who will eventually write the document contentspublic OPOIFSDocument(java.lang.String name,
int size,
POIFSDocumentPath path,
POIFSWriterListener writer)
public SmallDocumentBlock[] getSmallBlocks()
public int getSize()
public void writeBlocks(java.io.OutputStream stream)
throws java.io.IOException
writeBlocks in interface BlockWritablestream - the OutputStream to which the stored data should be writtenjava.io.IOException - on problems writing to the specified
streampublic int countBlocks()
countBlocks in interface BATManagedpublic void setStartBlock(int index)
setStartBlock in interface BATManagedindex - index into the array of blocks making up the filesystempublic java.lang.Object[] getViewableArray()
getViewableArray in interface POIFSViewablepublic java.util.Iterator<java.lang.Object> getViewableIterator()
getViewableIterator in interface POIFSViewablepublic boolean preferArray()
preferArray in interface POIFSViewabletrue if a viewer should call getViewableArray,
false if a viewer should call getViewableIteratorpublic java.lang.String getShortDescription()
getShortDescription in interface POIFSViewableCopyright 2018 The Apache Software Foundation or its licensors, as applicable.