Package org.ojalgo.netio
Interface ToFileWriter<T>
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
ScoredDualWriter<T>
- All Known Implementing Classes:
DataWriter
,ManagedWriter
,MappedWriter
,QueuedWriter
,ShardedWriter
,ShardedWriter.GeneralShardedConsumer
,ShardedWriter.PowerOf2ShardedConsumer
,TextLineWriter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
static void
Make sure this directory exists, create if necessarystatic <F> ToFileWriter.Builder
<F> newBuilder
(F... file) static ToFileWriter.Builder
<File> newBuilder
(File file) static ToFileWriter.Builder
<Path> newBuilder
(Path file) static ToFileWriter.Builder
<File> newBuilder
(ShardedFile sharded) static OutputStream
static <T extends Serializable>
voidserializeObjectToFile
(T object, File file) void
Write the item to the consumer.default void
writeBatch
(Iterable<? extends T> batch) Write the batch (collection of items) to the consumer.
-
Field Details
-
NULL
-
-
Method Details
-
mkdirs
Make sure this directory exists, create if necessary -
newBuilder
-
newBuilder
-
newBuilder
-
newBuilder
-
output
-
serializeObjectToFile
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
write
Write the item to the consumer.- Parameters:
item
- The item to be written
-
writeBatch
Write the batch (collection of items) to the consumer.- Parameters:
batch
- The batch to be written
-