public class POIFSDocument extends Object implements BATManaged, BlockWritable, POIFSViewable
| Constructor and Description |
|---|
POIFSDocument(String name,
int size,
POIFSDocumentPath path,
POIFSWriterListener writer,
int blockSize)
Constructor
|
POIFSDocument(String name,
ListManagedBlock[] blocks,
int length,
int size)
Constructor from small blocks
|
POIFSDocument(String name,
RandomAccessInputStream stream,
int size)
Constructor
|
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
|
DocumentBlock[] |
getBigBlocks() |
int |
getBigBlockSize() |
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()
return the array of SmallDocumentBlocks used
|
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 POIFSDocumentIOExceptionpublic 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, ListManagedBlock[] blocks, int length, int size) throws IOException
name - the name of the POIFSDocumentblocks - the small blocks making up the POIFSDocumentlength - the actual length of the POIFSDocumentIOExceptionpublic POIFSDocument(String name, RandomAccessInputStream stream, int size) throws IOException
name - the name of the POIFSDocumentstream - the InputStream we read data fromIOException - thrown on read errorspublic POIFSDocument(String name, int size, POIFSDocumentPath path, POIFSWriterListener writer, int blockSize) throws IOException
name - the name of the POIFSDocumentsize - the length of the POIFSDocumentpath - the path of the POIFSDocumentwriter - the writer who will eventually write the document
contentsIOException - thrown on read errorspublic BlockWritable[] getSmallBlocks()
public DocumentBlock[] getBigBlocks()
public int getSize()
public int getBigBlockSize()
public void writeBlocks(OutputStream stream) throws IOException
writeBlocks in interface BlockWritablestream - the OutputStream to which the stored data should
be writtenIOException - 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 Object[] getViewableArray()
getViewableArray in interface POIFSViewablepublic Iterator getViewableIterator()
getViewableIterator in interface POIFSViewablepublic boolean preferArray()
preferArray in interface POIFSViewablepublic String getShortDescription()
getShortDescription in interface POIFSViewableCopyright © 2014 Open Microscopy Environment