public class ResourceDocument extends java.lang.Object implements OutputFile
OutputFile
for resource documents.
(A resource document is an arbitrary binary file to include in the converter result)Constructor and Description |
---|
ResourceDocument(java.lang.String sFileName,
java.lang.String sMediaType)
Constructor (creates an empty document)
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFileName()
Returns the file name of the
OutputFile . |
java.lang.String |
getMIMEType()
Get the MIME type of the
OutputFile . |
boolean |
isMasterDocument()
Test whether this document is part of the main document flow (master documents) or
an auxiliary document
|
void |
read(java.io.InputStream is) |
void |
write(java.io.OutputStream os)
Writes the
OutputFile to an OutputStream . |
public ResourceDocument(java.lang.String sFileName, java.lang.String sMediaType)
sFileName
- Document
name.sMediaType
- the media typepublic java.lang.String getFileName()
OutputFile
OutputFile
. This includes
the file extension and may also include a relative path, always using
/ as separator.getFileName
in interface OutputFile
OutputFile
public java.lang.String getMIMEType()
OutputFile
OutputFile
.getMIMEType
in interface OutputFile
public boolean isMasterDocument()
OutputFile
isMasterDocument
in interface OutputFile
public void write(java.io.OutputStream os) throws java.io.IOException
OutputFile
OutputFile
to an OutputStream
.write
in interface OutputFile
os
- OutputStream
to which the content should be writtenjava.io.IOException
- if any I/O error occurspublic void read(java.io.InputStream is) throws java.io.IOException
java.io.IOException