public final class POIFSDocument extends Object implements BATManaged, BlockWritable, POIFSViewable
Constructor and Description |
---|
POIFSDocument(String name,
InputStream stream) |
POIFSDocument(String name,
int size,
POIFSBigBlockSize bigBlockSize,
POIFSDocumentPath path,
POIFSWriterListener writer)
Constructor
|
POIFSDocument(String name,
int size,
POIFSDocumentPath path,
POIFSWriterListener writer) |
POIFSDocument(String name,
ListManagedBlock[] blocks,
int length) |
POIFSDocument(String name,
POIFSBigBlockSize bigBlockSize,
InputStream stream)
Constructor
|
POIFSDocument(String name,
POIFSBigBlockSize bigBlockSize,
ListManagedBlock[] blocks,
int length)
Constructor from small blocks
|
POIFSDocument(String name,
RawDataBlock[] blocks,
int length)
Constructor from large blocks
|
POIFSDocument(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
|
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() |
Object[] |
getViewableArray()
Get an array of objects, some of which may implement POIFSViewable
|
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
|
void |
setStartBlock(int index)
Set the start block for this instance
|
void |
writeBlocks(OutputStream stream)
Write the storage to an OutputStream
|
public POIFSDocument(String name, RawDataBlock[] blocks, int length) throws IOException
name
- the name of the POIFSDocumentblocks
- the big blocks making up the POIFSDocumentlength
- the actual length of the POIFSDocumentIOException
public POIFSDocument(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(String name, POIFSBigBlockSize bigBlockSize, ListManagedBlock[] blocks, int length) throws IOException
name
- the name of the POIFSDocumentblocks
- the small blocks making up the POIFSDocumentlength
- the actual length of the POIFSDocumentIOException
public POIFSDocument(String name, ListManagedBlock[] blocks, int length) throws IOException
IOException
public POIFSDocument(String name, POIFSBigBlockSize bigBlockSize, InputStream stream) throws IOException
name
- the name of the POIFSDocumentstream
- the InputStream we read data fromIOException
public POIFSDocument(String name, InputStream stream) throws IOException
IOException
public POIFSDocument(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(String name, int size, POIFSDocumentPath path, POIFSWriterListener writer)
public BlockWritable[] getSmallBlocks()
public int getSize()
public void writeBlocks(OutputStream stream) throws IOException
writeBlocks
in interface BlockWritable
stream
- the OutputStream to which the stored data should be writtenIOException
- on problems writing to the specified
streampublic int countBlocks()
countBlocks
in interface BATManaged
public void setStartBlock(int index)
setStartBlock
in interface BATManaged
index
- index into the array of blocks making up the filesystempublic Object[] getViewableArray()
getViewableArray
in interface POIFSViewable
public Iterator 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 String getShortDescription()
getShortDescription
in interface POIFSViewable
Copyright © 2020. All rights reserved.