POIFSViewable, BATManaged, BlockWritablepublic final class POIFSDocument extends java.lang.Object implements BATManaged, BlockWritable, POIFSViewable
| Constructor | Description |
|---|---|
POIFSDocument(java.lang.String name,
int size,
POIFSBigBlockSize bigBlockSize,
POIFSDocumentPath path,
POIFSWriterListener writer) |
Constructor
|
POIFSDocument(java.lang.String name,
int size,
POIFSDocumentPath path,
POIFSWriterListener writer) |
|
POIFSDocument(java.lang.String name,
java.io.InputStream stream) |
|
POIFSDocument(java.lang.String name,
POIFSBigBlockSize bigBlockSize,
java.io.InputStream stream) |
Constructor
|
POIFSDocument(java.lang.String name,
POIFSBigBlockSize bigBlockSize,
ListManagedBlock[] blocks,
int length) |
Constructor from small blocks
|
POIFSDocument(java.lang.String name,
ListManagedBlock[] blocks,
int length) |
|
POIFSDocument(java.lang.String name,
RawDataBlock[] blocks,
int length) |
Constructor from large blocks
|
POIFSDocument(java.lang.String name,
SmallDocumentBlock[] blocks,
int length) |
Constructor from small blocks
|
| Modifier and Type | Method | 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() |
|
BlockWritable[] |
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 POIFSDocument(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 POIFSDocument(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 POIFSDocument(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 POIFSDocument(java.lang.String name,
ListManagedBlock[] blocks,
int length)
throws java.io.IOException
java.io.IOExceptionpublic POIFSDocument(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 POIFSDocument(java.lang.String name,
java.io.InputStream stream)
throws java.io.IOException
java.io.IOExceptionpublic POIFSDocument(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 POIFSDocument(java.lang.String name,
int size,
POIFSDocumentPath path,
POIFSWriterListener writer)
public BlockWritable[] 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.