Package org.ojalgo.netio
Class ManagedWriter<T>
- java.lang.Object
-
- org.ojalgo.netio.ManagedWriter<T>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,ToFileWriter<T>
final class ManagedWriter<T> extends java.lang.Object implements ToFileWriter<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ojalgo.netio.ToFileWriter
ToFileWriter.Builder<F>
-
-
Field Summary
Fields Modifier and Type Field Description private Throughput
myManager
private ToFileWriter<T>
myWriter
-
Fields inherited from interface org.ojalgo.netio.ToFileWriter
NULL
-
-
Constructor Summary
Constructors Constructor Description ManagedWriter(Throughput manager, ToFileWriter<T> writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
write(T item)
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
-
-
-
-
Field Detail
-
myManager
private final Throughput myManager
-
myWriter
private final ToFileWriter<T> myWriter
-
-
Constructor Detail
-
ManagedWriter
ManagedWriter(Throughput manager, ToFileWriter<T> writer)
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceToFileWriter<T>
- Throws:
java.io.IOException
-
write
public void write(T item)
Description copied from interface:ToFileWriter
Write the item to the consumer.- Specified by:
write
in interfaceToFileWriter<T>
- Parameters:
item
- The item to be written
-
-