- java.lang.Object
-
- org.ojalgo.netio.TextLineWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,ToFileWriter<java.lang.CharSequence>
public final class TextLineWriter extends java.lang.Object implements ToFileWriter<java.lang.CharSequence>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTextLineWriter.CSVLineBuilderA reusable delimited "text line" builder.static interfaceTextLineWriter.Formatter<T>-
Nested classes/interfaces inherited from interface org.ojalgo.netio.ToFileWriter
ToFileWriter.Builder<F>
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.BufferedWritermyWriter-
Fields inherited from interface org.ojalgo.netio.ToFileWriter
NULL
-
-
Constructor Summary
Constructors Constructor Description TextLineWriter(java.io.OutputStream outputStream)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()TextLineWriter.CSVLineBuildernewCSVLineBuilder(char delimiter)TextLineWriter.CSVLineBuildernewCSVLineBuilder(java.lang.String delimiter)static TextLineWriterof(java.io.File file)static TextLineWriterof(java.io.File file, OperatorWithException<java.io.OutputStream> filter)static TextLineWriterof(java.lang.String pathname)static TextLineWriterof(InMemoryFile file)static TextLineWriterof(InMemoryFile file, OperatorWithException<java.io.OutputStream> filter)<T> ToFileWriter<T>withFormatter(TextLineWriter.Formatter<T> formatter)voidwrite(java.lang.CharSequence itemToWrite)Write the item to the consumer.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ojalgo.netio.ToFileWriter
writeBatch
-
-
-
-
Method Detail
-
of
public static TextLineWriter of(java.io.File file)
-
of
public static TextLineWriter of(java.io.File file, OperatorWithException<java.io.OutputStream> filter)
-
of
public static TextLineWriter of(InMemoryFile file)
-
of
public static TextLineWriter of(InMemoryFile file, OperatorWithException<java.io.OutputStream> filter)
-
of
public static TextLineWriter of(java.lang.String pathname)
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceToFileWriter<java.lang.CharSequence>- Throws:
java.io.IOException
-
newCSVLineBuilder
public TextLineWriter.CSVLineBuilder newCSVLineBuilder(char delimiter)
- See Also:
TextLineWriter.CSVLineBuilder
-
newCSVLineBuilder
public TextLineWriter.CSVLineBuilder newCSVLineBuilder(java.lang.String delimiter)
- See Also:
TextLineWriter.CSVLineBuilder
-
withFormatter
public <T> ToFileWriter<T> withFormatter(TextLineWriter.Formatter<T> formatter)
-
write
public void write(java.lang.CharSequence itemToWrite)
Description copied from interface:ToFileWriterWrite the item to the consumer.- Specified by:
writein interfaceToFileWriter<java.lang.CharSequence>- Parameters:
itemToWrite- The item to be written
-
-