public class LaTeXDocument extends java.lang.Object implements Document
Class representing a LaTeX document.
Constructor and Description |
---|
LaTeXDocument(java.lang.String sName,
int nWrap,
boolean bIsMaster)
Constructs a new LaTeX Document.
|
Modifier and Type | Method and Description |
---|---|
LaTeXDocumentPortion |
getContents()
Returns the
LaTeXDocumentPortion , that contains the
contents of the 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(java.io.InputStream is)
This method is supposed to read
byte data from the InputStream. |
void |
setEncoding(java.lang.String sEncoding)
Set the output encoding to use when writing the document.
|
void |
write(java.io.OutputStream os)
Writes out the
Document content to the specified
OutputStream . |
public LaTeXDocument(java.lang.String sName, int nWrap, boolean bIsMaster)
Constructs a new LaTeX Document.
This new document is empty. Document data must added to the preamble and the body using appropriate methods.
sName
- The name of the LaTeXDocument
.nWrap
- Lines should be wrapped after this positionbIsMaster
- true if this is a master documentpublic void read(java.io.InputStream is) throws java.io.IOException
This method is supposed to read byte
data from the InputStream.
Currently it does nothing, since we don't need it.
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 OutputFile
Document
name with file extension.public java.lang.String getMIMEType()
OutputFile
OutputFile
.getMIMEType
in interface OutputFile
public boolean isMasterDocument()
OutputFile
isMasterDocument
in interface OutputFile
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 OutputFile
os
- OutputStream
to write out the
Document
content.java.io.IOException
- If any I/O error occurs.public void setEncoding(java.lang.String sEncoding)
Set the output encoding to use when writing the document.
public LaTeXDocumentPortion getContents()
Returns the LaTeXDocumentPortion
, that contains the
contents of the document.
LaTeXDocumentPortion
.