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 voidclose()static voidMake 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 OutputStreamstatic <T extends Serializable>
voidserializeObjectToFile(T object, File file) voidWrite the item to the consumer.default voidwriteBatch(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
write
-
writeBatch
-