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:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
size
public long size()- Returns:
- the amount of written bytes
-