Package org.apache.poi.poifs.filesystem
Class DocumentOutputStream
java.lang.Object
java.io.OutputStream
org.apache.poi.poifs.filesystem.DocumentOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
This class provides methods to write a DocumentEntry managed by a
POIFSFileSystem instance.-
Constructor Summary
ConstructorsConstructorDescriptionDocumentOutputStream(DirectoryEntry parent, String name) Create an OutputStream to create the specified new EntryDocumentOutputStream(DocumentEntry document) Create an OutputStream from the specified DocumentEntry. -
Method Summary
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
Constructor Details
-
DocumentOutputStream
Create an OutputStream from the specified DocumentEntry. The specified entry will be emptied.- Parameters:
document- the DocumentEntry to be written- Throws:
IOException
-
DocumentOutputStream
Create an OutputStream to create the specified new Entry- Parameters:
parent- Where to create the Entryname- Name of the new entry- Throws:
IOException
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
size
public long size()- Returns:
- the amount of written bytes
-