writer2latex.latex
Class LaTeXDocument
java.lang.Object
writer2latex.latex.LaTeXDocument
- Document, OutputFile
public class LaTeXDocument
extends java.lang.Object
Class representing a LaTeX document.
LaTeXDocument(String sName, int nWrap) - Constructs a new LaTeX Document.
This new document is empty.
|
LaTeXDocumentPortion | getContents() - Returns the
LaTeXDocumentPortion , that contains the
contents of the 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 is supposed to read
byte data from the InputStream.
|
void | setEncoding(String sEncoding) - Set the output encoding to use when writing the document.
|
void | write(OutputStream os) - Writes out the
Document content to the specified
OutputStream .
This method may not be thread-safe.
|
LaTeXDocument
public LaTeXDocument(String sName,
int nWrap)
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 position
getContents
public LaTeXDocumentPortion getContents()
Returns the LaTeXDocumentPortion
, that contains the
contents of the document.
- The content
LaTeXDocumentPortion
.
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 is supposed to read byte
data from the InputStream.
Currently it does nothing, since we don't need it.
- read in interface Document
is
- InputStream containing a LaTeX data file.
setEncoding
public void setEncoding(String sEncoding)
Set the output encoding to use when writing the document.
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.