public class POIFSDocument extends java.lang.Object implements BATManaged, BlockWritable, POIFSViewable
Constructor and Description |
---|
POIFSDocument(java.lang.String name,
int size,
POIFSDocumentPath path,
POIFSWriterListener writer,
int blockSize)
Constructor
|
POIFSDocument(java.lang.String name,
ListManagedBlock[] blocks,
int length,
int size)
Constructor from small blocks
|
POIFSDocument(java.lang.String name,
RandomAccessInputStream stream,
int size)
Constructor
|
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 and Description |
---|---|
int |
countBlocks()
Return the number of BigBlock's this instance uses
|
DocumentBlock[] |
getBigBlocks() |
int |
getBigBlockSize() |
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()
return the array of SmallDocumentBlocks used
|
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
|
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.IOException
public 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, ListManagedBlock[] blocks, int length, int size) throws java.io.IOException
name
- the name of the POIFSDocumentblocks
- the small blocks making up the POIFSDocumentlength
- the actual length of the POIFSDocumentjava.io.IOException
public POIFSDocument(java.lang.String name, RandomAccessInputStream stream, int size) throws java.io.IOException
name
- the name of the POIFSDocumentstream
- the InputStream we read data fromjava.io.IOException
- thrown on read errorspublic POIFSDocument(java.lang.String name, int size, POIFSDocumentPath path, POIFSWriterListener writer, int blockSize) throws java.io.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
contentsjava.io.IOException
- thrown on read errorspublic BlockWritable[] getSmallBlocks()
public DocumentBlock[] getBigBlocks()
public int getSize()
public int getBigBlockSize()
public void writeBlocks(java.io.OutputStream stream) throws java.io.IOException
writeBlocks
in interface BlockWritable
stream
- the OutputStream to which the stored data should
be writtenjava.io.IOException
- 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 java.lang.Object[] getViewableArray()
getViewableArray
in interface POIFSViewable
public java.util.Iterator getViewableIterator()
getViewableIterator
in interface POIFSViewable
public boolean preferArray()
preferArray
in interface POIFSViewable
public java.lang.String getShortDescription()
getShortDescription
in interface POIFSViewable
Copyright © 2014 Open Microscopy Environment