Save This Page
Home » cocoon-2.1.11-src » org.apache.cocoon.poi.poifs » filesystem » [javadoc | source]
org.apache.cocoon.poi.poifs.filesystem
public class: Document [javadoc | source]
java.lang.Object
   org.apache.cocoon.poi.poifs.filesystem.Document

All Implemented Interfaces:
    BlockWritable, BATManaged

This class manages a document in the POIFS filesystem.
Constructor:
 public Document(String name,
    InputStream stream) throws IOException 
    Constructor
    Parameters:
    name - the name of the Document
    stream - the InputStream we read data from
    Throws:
    IOException - thrown on read errors
    exception: IOException - thrown on read errors
 public Document(String name,
    RawDataBlock[] blocks,
    int length) throws IOException 
    Constructor from large blocks
    Parameters:
    name - the name of the Document
    blocks - the big blocks making up the Document
    length - the actual length of the Document
    Throws:
    IOException -
    exception: IOException -
 public Document(String name,
    SmallDocumentBlock[] blocks,
    int length) 
    Constructor from small blocks
    Parameters:
    name - the name of the Document
    blocks - the small blocks making up the Document
    length - the actual length of the Document
 public Document(String name,
    ListManagedBlock[] blocks,
    int length) throws IOException 
    Constructor from small blocks
    Parameters:
    name - the name of the Document
    blocks - the small blocks making up the Document
    length - the actual length of the Document
    Throws:
    IOException -
    exception: IOException -
Method from org.apache.cocoon.poi.poifs.filesystem.Document Summary:
countBlocks,   getDocumentProperty,   getSmallBlocks,   read,   setStartBlock,   writeBlocks
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.poi.poifs.filesystem.Document Detail:
 public int countBlocks() 
    Return the number of BigBlock's this instance uses
 DocumentProperty getDocumentProperty() 
    Get the DocumentProperty
 public BlockWritable[] getSmallBlocks() 
    return the array of SmallDocumentBlocks used
  void read(byte[] buffer,
    int offset) 
    read data from the internal stores
 public  void setStartBlock(int index) 
    Set the start block for this instance
 public  void writeBlocks(OutputStream stream) throws IOException 
    Write the storage to an OutputStream