writer2latex.xmerge
Class BinaryGraphicsDocument
java.lang.Object
writer2latex.xmerge.BinaryGraphicsDocument
- Document, OutputFile
public class BinaryGraphicsDocument
extends java.lang.Object
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.
BinaryGraphicsDocument(String name, String sFileExtension, String sMimeType) - Constructs a new graphics document.
This new document does not contain any information.
|
String | getDocumentMIMEType() - Method to return the MIME type of the document.
|
String | getFileExtension() - Returns the file extension for this type of
Document .
|
String | getFileName() - Returns the
Document name with file extension.
|
String | getName() - Returns the
Document name with no file extension.
|
void | read(InputStream is) - This method reads
byte data from the InputStream.
|
void | read(byte[] data)
|
void | read(byte[] data, int nOff, int nLen)
|
void | write(OutputStream os) - Writes out the
Document content to the specified
OutputStream .
This method may not be thread-safe.
|
BinaryGraphicsDocument
public BinaryGraphicsDocument(String name,
String sFileExtension,
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
.
getDocumentMIMEType
public String getDocumentMIMEType()
Method to return the MIME type of the document.
- String The document's MIME type.
getFileExtension
public String getFileExtension()
Returns the file extension for this type of
Document
.
- The file extension of
Document
.
getFileName
public String getFileName()
Returns the Document
name with file extension.
- getFileName in interface OutputFile
- The
Document
name with file extension.
getName
public String getName()
Returns the Document
name with no file extension.
- getName in interface Document
- The
Document
name with no file extension.
read
public void read(InputStream is)
throws IOException
This method reads byte
data from the InputStream.
- read in interface Document
is
- InputStream containing a binary data file.
read
public void read(byte[] data)
read
public void read(byte[] data,
int nOff,
int nLen)
write
public void write(OutputStream os)
throws 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 OutputFile
os
- OutputStream
to write out the
Document
content.