StarTableWriter
public class LatexTableWriter extends StreamStarTableWriter
standalone
attribute,
the output may either be a complete LaTeX document or just a
tabular environment suitable for inserting into an existing
document.Constructor | Description |
---|---|
LatexTableWriter() |
Constructs a new writer with default characteristics.
|
LatexTableWriter(boolean standalone) |
Constructs a new writer indicating whether it will produce complete
or partial LaTeX documents.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getFormatName() |
Returns the string "LaTeX-document" or "LaTeX";
|
java.lang.String |
getMimeType() |
Returns a string suitable for use as the value of a MIME
Content-Type header.
|
static StarTableWriter[] |
getStarTableWriters() |
Returns a useful list of LatexTableWriters.
|
boolean |
isStandalone() |
Indicates whether output tables will be complete LaTeX documents.
|
boolean |
looksLikeFile(java.lang.String location) |
Indicates whether the destination is of a familiar form for this
kind of writer.
|
protected void |
printFooter(java.io.OutputStream ostrm,
StarTable startab) |
For standalone output, this method is invoked to output any text
following the
tabular environment. |
protected void |
printHeader(java.io.OutputStream ostrm,
StarTable startab) |
For standalone output, this method is invoked to output any text
preceding the
tabular environment. |
void |
setStandalone(boolean standalone) |
Sets whether output tables should be complete LaTeX documents.
|
void |
writeStarTable(StarTable startab,
java.io.OutputStream ostrm) |
Writes a StarTable object to a given output stream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
writeStarTable
public LatexTableWriter()
public LatexTableWriter(boolean standalone)
public void setStandalone(boolean standalone)
standalone
- true if the output document should be a
complete LaTeX documentpublic boolean isStandalone()
public java.lang.String getFormatName()
public java.lang.String getMimeType()
StarTableWriter
application/octet-stream
"
(for binary formats) or "text/plain
" for ASCII ones)
is recommended.public boolean looksLikeFile(java.lang.String location)
StarTableWriter
location
- the location name (probably filename)public void writeStarTable(StarTable startab, java.io.OutputStream ostrm) throws java.io.IOException
StarTableWriter
BufferedOutputStream
), and should not close it
at the end of the call.
Not all table writers are capable of writing to a stream;
an implementation may throw a TableFormatException
to
indicate that it cannot do so.
startab
- the table to writeostrm
- the output stream to which startab should be
writtenTableFormatException
- if this table cannot be written to a
streamjava.io.IOException
- if there is some I/O errorpublic static StarTableWriter[] getStarTableWriters()
protected void printHeader(java.io.OutputStream ostrm, StarTable startab) throws java.io.IOException
tabular
environment. May be overridden to
modify the form of output documents.ostrm
- output streamstartab
- table for which header is requiredjava.io.IOException
protected void printFooter(java.io.OutputStream ostrm, StarTable startab) throws java.io.IOException
tabular
environment. May be overridden to
modify the form of output documents.ostrm
- the stream to write tostartab
- the StarTable which the tabular will containjava.io.IOException
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.