| java.lang.Object org.apache.poi.poifs.filesystem.POIFSFileSystem
POIFSFileSystem | public class POIFSFileSystem implements POIFSViewable(Code) | | This is the main class of the POIFS system; it manages the entire
life cycle of the filesystem.
author: Marc Johnson (mjohnson at apache dot org) |
POIFSFileSystem | public POIFSFileSystem()(Code) | | Constructor, intended for writing
|
POIFSFileSystem | public POIFSFileSystem(InputStream stream) throws IOException(Code) | | Create a POIFSFileSystem from an InputStream
Parameters: stream - the InputStream from which to read the data exception: IOException - on errors reading, or on invalid data |
addDirectory | void addDirectory(DirectoryProperty directory)(Code) | | add a new DirectoryProperty
Parameters: directory - the DirectoryProperty being added |
addDocument | void addDocument(POIFSDocument document)(Code) | | add a new POIFSDocument
Parameters: document - the POIFSDocument being added |
createDirectory | public DirectoryEntry createDirectory(String name) throws IOException(Code) | | create a new DirectoryEntry in the root directory
Parameters: name - the name of the new DirectoryEntry the new DirectoryEntry exception: IOException - on name duplication |
createDocument | public DocumentEntry createDocument(InputStream stream, String name) throws IOException(Code) | | Create a new document to be added to the root directory
Parameters: stream - the InputStream from which the document's datawill be obtained Parameters: name - the name of the new POIFSDocument the new DocumentEntry exception: IOException - on error creating the new POIFSDocument |
createDocument | public DocumentEntry createDocument(String name, int size, POIFSWriterListener writer) throws IOException(Code) | | create a new DocumentEntry in the root entry; the data will be
provided later
Parameters: name - the name of the new DocumentEntry Parameters: size - the size of the new DocumentEntry Parameters: writer - the writer of the new DocumentEntry the new DocumentEntry exception: IOException - |
createDocumentInputStream | public DocumentInputStream createDocumentInputStream(String documentName) throws IOException(Code) | | open a document in the root entry's list of entries
Parameters: documentName - the name of the document to be opened a newly opened DocumentInputStream exception: IOException - if the document does not exist or thename is that of a DirectoryEntry |
getShortDescription | public String getShortDescription()(Code) | | Provides a short description of the object, to be used when a
POIFSViewable object has not provided its contents.
short description |
getViewableArray | public Object[] getViewableArray()(Code) | | Get an array of objects, some of which may implement
POIFSViewable
an array of Object; may not be null, but may be empty |
getViewableIterator | public Iterator getViewableIterator()(Code) | | Get an Iterator of objects, some of which may implement
POIFSViewable
an Iterator; may not be null, but may have an emptyback end store |
main | public static void main(String args) throws IOException(Code) | | read in a file and write it back out again
Parameters: args - names of the files; arg[ 0 ] is the input file,arg[ 1 ] is the output file exception: IOException - |
preferArray | public boolean preferArray()(Code) | | Give viewers a hint as to whether to call getViewableArray or
getViewableIterator
true if a viewer should call getViewableArray, false ifa viewer should call getViewableIterator |
remove | void remove(EntryNode entry)(Code) | | remove an entry
Parameters: entry - to be removed |
writeFilesystem | public void writeFilesystem(OutputStream stream) throws IOException(Code) | | Write the filesystem out
Parameters: stream - the OutputStream to which the filesystem will bewritten exception: IOException - thrown on errors writing to the stream |
|
|