public class AsciiTableWriter extends AbstractTextTableWriter
AsciiStarTable and AsciiTableBuilder.| Constructor and Description |
|---|
AsciiTableWriter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
docIncludesExample()
Indicates whether the serialization of some (short) example table
should be added to the user documentation for this handler.
|
protected String |
formatValue(Object val,
ValueInfo vinfo,
int width)
Formats a data value for output.
|
String |
getFormatName()
Returns "ascii".
|
String |
getXmlDescription()
Returns user-directed documentation in XML format.
|
protected void |
printColumnHeads(OutputStream strm,
int[] colwidths,
ColumnInfo[] cinfos)
Outputs headings for the table columns.
|
protected void |
printLine(OutputStream strm,
int[] colwidths,
String[] data)
Outputs a line of table data.
|
protected void |
printParam(OutputStream strm,
String name,
String value,
Class<?> clazz)
Outputs a parameter and its value.
|
protected void |
printSeparator(OutputStream strm,
int[] colwidths)
Outputs a decorative separator line, of the sort you might find
between the column headings and the table data.
|
getBytes, getMaximumParameterLength, getMaxWidth, getMimeType, getMinNameWidth, getSampledRows, getWriteParameters, setMaximumParameterLength, setMaxWidth, setSampledRows, setWriteParameters, writeStarTablegetExtensions, looksLikeFile, writeStarTableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmatchesExtension, readText, toLinkprotected String formatValue(Object val, ValueInfo vinfo, int width)
AbstractTextTableWriterformatValue in class AbstractTextTableWriterval - the valuevinfo - the metadata object describing val's typewidth - maximum preferred width into which the value should
be formattedvalue,
preferably no longer than width characterspublic String getFormatName()
getFormatName in interface StarTableWritergetFormatName in class AbstractTextTableWriterpublic boolean docIncludesExample()
DocumentedIOHandlerDocumented.getXmlDescription()
method already includes some example output, should return false.public String getXmlDescription()
DocumentedThe output should be a sequence of one or more <P> elements, using XHTML-like XML. Since rendering may be done in a number of contexts however, use of the full range of XHTML elements is discouraged. Where possible, the content should stick to simple markup such as the elements P, A, UL, OL, LI, DL, DT, DD EM, STRONG, I, B, CODE, TT, PRE.
protected void printSeparator(OutputStream strm, int[] colwidths)
AbstractTextTableWriterprintSeparator in class AbstractTextTableWriterstrm - stream to write intocolwidths - column widths in charactersprotected void printLine(OutputStream strm, int[] colwidths, String[] data) throws IOException
AbstractTextTableWriterprintLine in class AbstractTextTableWriterstrm - stream to write intocolwidths - column widths in charactersdata - array of strings to be output, one per columnIOExceptionprotected void printColumnHeads(OutputStream strm, int[] colwidths, ColumnInfo[] cinfos) throws IOException
AbstractTextTableWriterprintColumnHeads in class AbstractTextTableWriterstrm - stream to write intocolwidths - column widths in characterscinfos - array of column headingsIOExceptionprotected void printParam(OutputStream strm, String name, String value, Class<?> clazz) throws IOException
AbstractTextTableWriterprintParam in class AbstractTextTableWriterstrm - stream to write intoname - parameter namevalue - formatted parameter valueclazz - type of valueIOExceptionCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.