| 
SSJ  V. 2.6.  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.util.io.AbstractDataWriter
umontreal.iro.lecuyer.util.io.CachedDataWriter
umontreal.iro.lecuyer.util.io.TextDataWriter
public class TextDataWriter
Text data writer. Writes fields as columns or as rows in a text file.
| Nested Class Summary | |
|---|---|
static class | 
TextDataWriter.Format
Output format: organize fields as columns or as rows.  | 
| Field Summary | |
|---|---|
 String | 
DEFAULT_COLUMN_SEPARATOR
Default value for the column separator.  | 
 String | 
DEFAULT_HEADER_PREFIX
Default value for the header prefix.  | 
| Constructor Summary | |
|---|---|
TextDataWriter(File file,
               TextDataWriter.Format format,
               boolean withHeaders)
Class constructor.  | 
|
TextDataWriter(OutputStream outputStream,
               TextDataWriter.Format format,
               boolean withHeaders)
Class constructor.  | 
|
TextDataWriter(String filename,
               TextDataWriter.Format format,
               boolean withHeaders)
Class constructor.  | 
|
| Method Summary | |
|---|---|
 void | 
close()
Flushes any pending data and closes the file or stream.  | 
 void | 
setColumnSeparator(String columnSeparator)
Changes the column separator.  | 
 void | 
setFloatFormatString(String formatString)
Sets the format string used to output floating point numbers.  | 
 void | 
setFormat(TextDataWriter.Format format)
Changes the output format.  | 
 void | 
setHeaderPrefix(String headerPrefix)
Changes the header prefix (a string that indicates the beginning of the header line for the COLUMNS format).  | 
| Methods inherited from class umontreal.iro.lecuyer.util.io.CachedDataWriter | 
|---|
write, write, write, write, write, write, write, write, write, write, write, write | 
| Methods inherited from class umontreal.iro.lecuyer.util.io.AbstractDataWriter | 
|---|
write, write, write, write | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public final String DEFAULT_COLUMN_SEPARATOR
public final String DEFAULT_HEADER_PREFIX
| Constructor Detail | 
|---|
public TextDataWriter(String filename,
                      TextDataWriter.Format format,
                      boolean withHeaders)
               throws IOException
filename - name of the file to write toformat - organize fields as columns if set to COLUMNS or as rows if set to ROWSwithHeaders - output headers or not
IOException
public TextDataWriter(File file,
                      TextDataWriter.Format format,
                      boolean withHeaders)
               throws IOException
file - file to write toformat - organize fields as columns if set to COLUMNS or as rows if set to ROWSwithHeaders - output headers or not
IOException
public TextDataWriter(OutputStream outputStream,
                      TextDataWriter.Format format,
                      boolean withHeaders)
               throws IOException
outputStream - output stream to write toformat - organize fields as columns if set to COLUMNS or as rows if set to ROWSwithHeaders - output headers or not
IOException| Method Detail | 
|---|
public void setFormat(TextDataWriter.Format format)
format - organize fields as columns if set to COLUMNS or as rows if set to ROWSpublic void setFloatFormatString(String formatString)
formatString - format string (e.g., %.4g)public void setColumnSeparator(String columnSeparator)
public void setHeaderPrefix(String headerPrefix)
public void close()
           throws IOException
IOException
  | 
SSJ  V. 2.6.  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||