|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwriter2latex.latex.LaTeXDocument
public class LaTeXDocument
Class representing a LaTeX document.
Field Summary | |
---|---|
private LaTeXDocumentPortion |
contents
|
private static java.lang.String |
FILE_EXTENSION
|
private int |
nWrap
|
private java.lang.String |
sEncoding
|
private java.lang.String |
sName
|
Constructor Summary | |
---|---|
LaTeXDocument(java.lang.String sName,
int nWrap)
Constructs a new LaTeX Document. |
Method Summary | |
---|---|
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 |
getName()
Returns the Document name with no file extension. |
void |
read(java.io.InputStream docData)
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. |
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 |
---|
private static final java.lang.String FILE_EXTENSION
private java.lang.String sName
private java.lang.String sEncoding
private int nWrap
private LaTeXDocumentPortion contents
Constructor Detail |
---|
public LaTeXDocument(java.lang.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.
name
- The name of the LaTeXDocument
.nWrap
- Lines should be wrapped after this positionMethod Detail |
---|
public void read(java.io.InputStream docData) 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.
read
in interface Document
is
- InputStream containing a LaTeX data file.
java.io.IOException
- In case of any I/O errors.public java.lang.String getName()
Returns the Document
name with no file extension.
getName
in interface Document
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 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
.private java.lang.String trimDocumentName(java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |