Package writer2latex.xhtml

# Class ResourceDocument

java.lang.Object
writer2latex.xhtml.ResourceDocument

All Implemented Interfaces:
  `OutputFile`

public class ResourceDocument extends Object implements OutputFile
An implementation of `OutputFile` for resource documents. (A resource document is an arbitrary binary file to include in the converter result)

## Constructor Summary

Constructors
Constructor
Description
`ResourceDocument(String sFileName, String sMediaType)`
Constructor (creates an empty document)

## Method Summary

Modifier and Type
Method
Description
`boolean`
`containsMath()`
Test whether this document contains mathematical formulas
`String`
`getFileName()`
Returns the file name of the `OutputFile`.
`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(InputStream is)`
Load the resource document bytes from an arbitrary input stream
`void`
`write(OutputStream os)`
Writes the `OutputFile` to an `OutputStream`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ResourceDocument

public ResourceDocument(String sFileName, String sMediaType)
Constructor (creates an empty document)

Parameters:
  `sFileName` - `Document` name.
  `sMediaType` - the media type

## Method Details

### getFileName

public String getFileName()
Description copied from interface: `OutputFile`
Returns the file name of the `OutputFile`. This includes the file extension and may also include a relative path, always using / as separator.

Specified by:
  `getFileName` in interface `OutputFile`
Returns:
  the file name of this `OutputFile`

### getMIMEType

public String getMIMEType()
Description copied from interface: `OutputFile`
Get the MIME type of the `OutputFile`.

Specified by:
  `getMIMEType` in interface `OutputFile`
Returns:
  string representation of the MIME type

### isMasterDocument

public boolean isMasterDocument()
Description copied from interface: `OutputFile`
Test whether this document is part of the main document flow (master documents) or an auxiliary document

Specified by:
  `isMasterDocument` in interface `OutputFile`
Returns:
  true if this document is a master document

### containsMath

public boolean containsMath()
Description copied from interface: `OutputFile`
Test whether this document contains mathematical formulas

Specified by:
  `containsMath` in interface `OutputFile`
Returns:
  true if the document contains formulas

### write

public void write(OutputStream os) throws IOException
Description copied from interface: `OutputFile`
Writes the `OutputFile` to an `OutputStream`.

Specified by:
  `write` in interface `OutputFile`
Parameters:
  `os` - `OutputStream` to which the content should be written
Throws:
  `IOException` - if any I/O error occurs

### read

public void read(InputStream is) throws IOException
Load the resource document bytes from an arbitrary input stream

Parameters:
  `is` - the input stream
Throws:
  `IOException` - if any error occurs reading the input stream