Class BinaryGraphicsDocument
- java.lang.Object
-
- writer2latex.xmerge.BinaryGraphicsDocument
-
- All Implemented Interfaces:
OutputFile,Document
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.
GraphicsDocumentis used to create new graphics documents.
-
-
Constructor Summary
Constructors Constructor Description BinaryGraphicsDocument(java.lang.String name, java.lang.String sFileExtension, java.lang.String sMimeType)Constructs a new graphics document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDocumentMIMEType()Method to return the MIME type of the document.java.lang.StringgetFileExtension()Returns the file extension for this type ofDocument.java.lang.StringgetFileName()Returns theDocumentname with file extension.java.lang.StringgetName()Returns theDocumentname with no file extension.voidread(byte[] data)voidread(byte[] data, int nOff, int nLen)voidread(java.io.InputStream is)This method readsbytedata from the InputStream.voidwrite(java.io.OutputStream os)Writes out theDocumentcontent to the specifiedOutputStream.
-
-
-
Constructor Detail
-
BinaryGraphicsDocument
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
readfrom anInputStream.- Parameters:
name- The name of theGraphicsDocument.
-
-
Method Detail
-
read
public void read(java.io.InputStream is) throws java.io.IOExceptionThis method reads
bytedata from the InputStream.
-
read
public void read(byte[] data)
-
read
public void read(byte[] data, int nOff, int nLen)
-
getName
public java.lang.String getName()
Returns the
Documentname with no file extension.
-
getFileName
public java.lang.String getFileName()
Returns the
Documentname with file extension.- Specified by:
getFileNamein interfaceOutputFile- Returns:
- The
Documentname with file extension.
-
write
public void write(java.io.OutputStream os) throws java.io.IOExceptionWrites out the
Documentcontent to the specifiedOutputStream.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.
- Specified by:
writein interfaceOutputFile- Parameters:
os-OutputStreamto write out theDocumentcontent.- Throws:
java.io.IOException- If any I/O error occurs.
-
getFileExtension
public java.lang.String getFileExtension()
Returns the file extension for this type ofDocument.- Returns:
- The file extension of
Document.
-
getDocumentMIMEType
public java.lang.String getDocumentMIMEType()
Method to return the MIME type of the document.- Returns:
- String The document's MIME type.
-
-