public class BinaryGraphicsDocument extends java.lang.Object implements Document
Class representing a binary graphics document. This class is used for representing graphics documents that are not interpreted in any way, but simply copied verbatim from the source format to the target format.
GraphicsDocument is used to create new graphics documents.
| Constructor and Description |
|---|
BinaryGraphicsDocument(java.lang.String name,
java.lang.String sFileExtension,
java.lang.String sMimeType)
Constructs a new graphics document.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDocumentMIMEType()
Method to return the MIME type of the document.
|
java.lang.String |
getFileExtension()
Returns the file extension for this type of
Document. |
java.lang.String |
getFileName()
Returns the
Document name with file extension. |
java.lang.String |
getMIMEType()
Get the MIME type of the
OutputFile. |
java.lang.String |
getName()
Returns the
Document name with no file extension. |
boolean |
isMasterDocument()
Test whether this document is part of the main document flow (master documents) or
an auxiliary document
|
void |
read(byte[] data) |
void |
read(byte[] data,
int nOff,
int nLen) |
void |
read(java.io.InputStream is)
This method reads
byte data from the InputStream. |
void |
write(java.io.OutputStream os)
Writes out the
Document content to the specified
OutputStream. |
public BinaryGraphicsDocument(java.lang.String name,
java.lang.String sFileExtension,
java.lang.String sMimeType)
Constructs a new graphics document.
This new document does not contain any information. Document data must
either be added using appropriate methods, or an existing file can be
read from an InputStream.
name - The name of the GraphicsDocument.public void read(java.io.InputStream is)
throws java.io.IOException
This method reads byte data from the InputStream.
public void read(byte[] data)
public void read(byte[] data,
int nOff,
int nLen)
public java.lang.String getName()
Returns the Document name with no file extension.
public java.lang.String getFileName()
Returns the Document name with file extension.
getFileName in interface OutputFileDocument name with file extension.public void write(java.io.OutputStream os)
throws java.io.IOException
Writes out the Document content to the specified
OutputStream.
This method may not be thread-safe. Implementations may or may not synchronize this method. User code (i.e. caller) must make sure that calls to this method are thread-safe.
write in interface OutputFileos - OutputStream to write out the
Document content.java.io.IOException - If any I/O error occurs.public java.lang.String getFileExtension()
Document.Document.public java.lang.String getDocumentMIMEType()
public java.lang.String getMIMEType()
OutputFileOutputFile.getMIMEType in interface OutputFilepublic boolean isMasterDocument()
OutputFileisMasterDocument in interface OutputFile