Class DataWriter<T>
java.lang.Object
org.ojalgo.netio.DataWriter<T>
- All Implemented Interfaces:
Closeable, AutoCloseable, ToFileWriter<T>
A
DataOutput based ToFileWriter. You have to construct and supply a custom
DataWriter.Serializer instance to use this writer.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface ToFileWriter
ToFileWriter.Builder<F> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DataOutputStreamprivate final DataWriter.Serializer<T> Fields inherited from interface ToFileWriter
NULL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static <T> DataWriter<T> of(File file, DataWriter.Serializer<T> serializer) static <T> DataWriter<T> of(File file, DataWriter.Serializer<T> serializer, OperatorWithException<OutputStream> filter) static <T> DataWriter<T> of(InMemoryFile file, DataWriter.Serializer<T> serializer) static <T> DataWriter<T> of(InMemoryFile file, DataWriter.Serializer<T> serializer, OperatorWithException<OutputStream> filter) voidWrite the item to the consumer.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ToFileWriter
writeBatch
-
Field Details
-
myOutput
-
mySerializer
-
-
Constructor Details
-
DataWriter
-
-
Method Details
-
of
-
of
public static <T> DataWriter<T> of(File file, DataWriter.Serializer<T> serializer, OperatorWithException<OutputStream> filter) -
of
-
of
public static <T> DataWriter<T> of(InMemoryFile file, DataWriter.Serializer<T> serializer, OperatorWithException<OutputStream> filter) -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceToFileWriter<T>- Throws:
IOException
-
write
Description copied from interface:ToFileWriterWrite the item to the consumer.- Specified by:
writein interfaceToFileWriter<T>- Parameters:
itemToWrite- The item to be written
-