Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## writer2latex.xmerge
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.

`GraphicsDocument` is used to create new graphics documents.

Field Summary
`private static int` | `BUFFERSIZE`
`private byte[]` | `data`
`private java.lang.String` | `docName`
`private int` | `nLen`
`private int` | `nOff`
`private java.lang.String` | `sFileExtension`
`private java.lang.String` | `sMimeType`

Constructor Summary
`BinaryGraphicsDocument(java.lang.String name, java.lang.String sFileExtension, java.lang.String sMimeType)` Constructs a new graphics document.

Method Summary
`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` | `getName()` Returns the `Document` name with no file extension.
`void` | `read(byte[] data)`
`void` | `read(byte[] data, int nOff, int nLen)`
`void` | `read(java.io.InputStream docData)` This method reads `byte` data from the InputStream.
`private java.lang.String` | `trimDocumentName(java.lang.String name)`
`void` | `write(java.io.OutputStream os)` Writes out the `Document` content to the specified `OutputStream`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BUFFERSIZE

    private static final int BUFFERSIZE

See Also:
  Constant Field Values

### docName

    private java.lang.String docName

### data

    private byte[] data

### nOff

    private int nOff

### nLen

    private int nLen

### sFileExtension

    private java.lang.String sFileExtension

### sMimeType

    private java.lang.String sMimeType

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 `read` from an `InputStream`.

  Parameters:
    `name` - The name of the `GraphicsDocument`.

Method Detail

### read

    public void read(java.io.InputStream docData)
              throws java.io.IOException

  This method reads `byte` data from the InputStream.

  Specified by:
    `read` in interface `Document`
  Parameters:
    `is` - InputStream containing a binary data file.
  Throws:
    `java.io.IOException` - In case of any I/O errors.

### read

    public void read(byte[] data)

### read

    public void read(byte[] data,
                     int nOff,
                     int nLen)

### trimDocumentName

    private java.lang.String trimDocumentName(java.lang.String name)

### getName

    public java.lang.String getName()

  Returns the `Document` name with no file extension.

  Specified by:
    `getName` in interface `Document`
  Returns:
    The `Document` name with no file extension.

### getFileName

    public java.lang.String getFileName()

  Returns the `Document` name with file extension.

  Specified by:
    `getFileName` in interface `OutputFile`
  Returns:
    The `Document` name with file extension.

### write

    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.

  Specified by:
    `write` in interface `OutputFile`
  Parameters:
    `os` - `OutputStream` to write out the `Document` content.
  Throws:
    `java.io.IOException` - If any I/O error occurs.

### getFileExtension

    public java.lang.String getFileExtension()

  Returns the file extension for this type of `Document`.

  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD