Class LaTeXDocument
- All Implemented Interfaces:
OutputFile
,Document
Class representing a LaTeX document.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theLaTeXDocumentPortion
, that contains the contents of the document.Returns theDocument
name with file extension.getName()
Returns theDocument
name with no file extension.void
read
(InputStream is) This method is supposed to readbyte
data from the InputStream.void
setEncoding
(String sEncoding) Set the output encoding to use when writing the document.void
write
(OutputStream os) Writes out theDocument
content to the specifiedOutputStream
.
-
Constructor Details
-
LaTeXDocument
Constructs a new LaTeX Document.
This new document is empty. Document data must added to the preamble and the body using appropriate methods.
- Parameters:
sName
- The name of theLaTeXDocument
.nWrap
- Lines should be wrapped after this position
-
-
Method Details
-
read
This method is supposed to read
byte
data from the InputStream. Currently it does nothing, since we don't need it.- Specified by:
read
in interfaceDocument
- Parameters:
is
- InputStream containing a LaTeX data file.- Throws:
IOException
- In case of any I/O errors.
-
getName
Returns the
Document
name with no file extension. -
getFileName
Returns the
Document
name with file extension.- Specified by:
getFileName
in interfaceOutputFile
- Returns:
- The
Document
name with file extension.
-
write
Writes out the
Document
content to the specifiedOutputStream
.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 interfaceOutputFile
- Parameters:
os
-OutputStream
to write out theDocument
content.- Throws:
IOException
- If any I/O error occurs.
-
setEncoding
Set the output encoding to use when writing the document.
-
getContents
Returns the
LaTeXDocumentPortion
, that contains the contents of the document.- Returns:
- The content
LaTeXDocumentPortion
.
-